plotly.pyi 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906
  1. """Stub file for reflex/components/plotly/plotly.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, Optional, TypedDict, TypeVar, overload
  6. from reflex.components.component import NoSSRComponent
  7. from reflex.event import EventType
  8. from reflex.style import Style
  9. from reflex.utils import console
  10. from reflex.utils.imports import ImportDict
  11. from reflex.vars.base import Var
  12. try:
  13. from plotly.graph_objects import Figure, layout
  14. Template = layout.Template
  15. except ImportError:
  16. console.warn("Plotly is not installed. Please run `pip install plotly`.")
  17. Figure = Any
  18. Template = Any
  19. T = TypeVar("T")
  20. ItemOrList = T | list[T]
  21. class BBox(TypedDict):
  22. x0: float | int | None
  23. x1: float | int | None
  24. y0: float | int | None
  25. y1: float | int | None
  26. z0: float | int | None
  27. z1: float | int | None
  28. class Point(TypedDict):
  29. x: float | int | None
  30. y: float | int | None
  31. z: float | int | None
  32. lat: float | int | None
  33. lon: float | int | None
  34. curveNumber: int | None
  35. pointNumber: int | None
  36. pointNumbers: list[int] | None
  37. pointIndex: int | None
  38. markerColor: ItemOrList[ItemOrList[float | int | str | None]] | None
  39. markerSize: ItemOrList[ItemOrList[float | int | None,]] | None
  40. bbox: BBox | None
  41. class Plotly(NoSSRComponent):
  42. def add_imports(self) -> dict[str, str]: ...
  43. def add_custom_code(self) -> list[str]: ...
  44. @overload
  45. @classmethod
  46. def create( # type: ignore
  47. cls,
  48. *children,
  49. data: Figure | Var[Figure] | None = None, # type: ignore
  50. layout: Dict | Var[Dict] | None = None,
  51. template: Template | Var[Template] | None = None, # type: ignore
  52. config: Dict | Var[Dict] | None = None,
  53. use_resize_handler: Var[bool] | bool | None = None,
  54. style: Style | None = None,
  55. key: Any | None = None,
  56. id: Any | None = None,
  57. class_name: Any | None = None,
  58. autofocus: bool | None = None,
  59. custom_attrs: dict[str, Var | Any] | None = None,
  60. on_after_plot: Optional[EventType[()]] = None,
  61. on_animated: Optional[EventType[()]] = None,
  62. on_animating_frame: Optional[EventType[()]] = None,
  63. on_animation_interrupted: Optional[EventType[()]] = None,
  64. on_autosize: Optional[EventType[()]] = None,
  65. on_before_hover: Optional[EventType[()]] = None,
  66. on_blur: Optional[EventType[()]] = None,
  67. on_button_clicked: Optional[EventType[()]] = None,
  68. on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
  69. on_context_menu: Optional[EventType[()]] = None,
  70. on_deselect: Optional[EventType[()]] = None,
  71. on_double_click: Optional[EventType[()]] = None,
  72. on_focus: Optional[EventType[()]] = None,
  73. on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
  74. on_mount: Optional[EventType[()]] = None,
  75. on_mouse_down: Optional[EventType[()]] = None,
  76. on_mouse_enter: Optional[EventType[()]] = None,
  77. on_mouse_leave: Optional[EventType[()]] = None,
  78. on_mouse_move: Optional[EventType[()]] = None,
  79. on_mouse_out: Optional[EventType[()]] = None,
  80. on_mouse_over: Optional[EventType[()]] = None,
  81. on_mouse_up: Optional[EventType[()]] = None,
  82. on_redraw: Optional[EventType[()]] = None,
  83. on_relayout: Optional[EventType[()]] = None,
  84. on_relayouting: Optional[EventType[()]] = None,
  85. on_restyle: Optional[EventType[()]] = None,
  86. on_scroll: Optional[EventType[()]] = None,
  87. on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
  88. on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
  89. on_transition_interrupted: Optional[EventType[()]] = None,
  90. on_transitioning: Optional[EventType[()]] = None,
  91. on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
  92. on_unmount: Optional[EventType[()]] = None,
  93. **props,
  94. ) -> "Plotly":
  95. """Create the Plotly component.
  96. Args:
  97. *children: The children of the component.
  98. data: The figure to display. This can be a plotly figure or a plotly data json.
  99. layout: The layout of the graph.
  100. template: The template for visual appearance of the graph.
  101. config: The config of the graph.
  102. use_resize_handler: If true, the graph will resize when the window is resized.
  103. on_after_plot: Fired after the plot is redrawn.
  104. on_animated: Fired after the plot was animated.
  105. on_animating_frame: Fired while animating a single frame (does not currently pass data through).
  106. on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
  107. on_autosize: Fired when the plot is responsively sized.
  108. on_before_hover: Fired whenever mouse moves over a plot.
  109. on_button_clicked: Fired when a plotly UI button is clicked.
  110. on_click: Fired when the plot is clicked.
  111. on_deselect: Fired when a selection is cleared (via double click).
  112. on_double_click: Fired when the plot is double clicked.
  113. on_hover: Fired when a plot element is hovered over.
  114. on_relayout: Fired after the plot is laid out (zoom, pan, etc).
  115. on_relayouting: Fired while the plot is being laid out.
  116. on_restyle: Fired after the plot style is changed.
  117. on_redraw: Fired after the plot is redrawn.
  118. on_selected: Fired after selecting plot elements.
  119. on_selecting: Fired while dragging a selection.
  120. on_transitioning: Fired while an animation is occurring.
  121. on_transition_interrupted: Fired when a transition is stopped early.
  122. on_unhover: Fired when a hovered element is no longer hovered.
  123. style: The style of the component.
  124. key: A unique key for the component.
  125. id: The id for the component.
  126. class_name: The class name for the component.
  127. autofocus: Whether the component should take the focus once the page is loaded
  128. custom_attrs: custom attribute
  129. **props: The properties of the component.
  130. Returns:
  131. The Plotly component.
  132. """
  133. ...
  134. CREATE_PLOTLY_COMPONENT: ImportDict
  135. def dynamic_plotly_import(name: str, package: str) -> str: ...
  136. class PlotlyBasic(Plotly):
  137. def add_imports(self) -> ImportDict | list[ImportDict]: ...
  138. @overload
  139. @classmethod
  140. def create( # type: ignore
  141. cls,
  142. *children,
  143. data: Figure | Var[Figure] | None = None, # type: ignore
  144. layout: Dict | Var[Dict] | None = None,
  145. template: Template | Var[Template] | None = None, # type: ignore
  146. config: Dict | Var[Dict] | None = None,
  147. use_resize_handler: Var[bool] | bool | None = None,
  148. style: Style | None = None,
  149. key: Any | None = None,
  150. id: Any | None = None,
  151. class_name: Any | None = None,
  152. autofocus: bool | None = None,
  153. custom_attrs: dict[str, Var | Any] | None = None,
  154. on_after_plot: Optional[EventType[()]] = None,
  155. on_animated: Optional[EventType[()]] = None,
  156. on_animating_frame: Optional[EventType[()]] = None,
  157. on_animation_interrupted: Optional[EventType[()]] = None,
  158. on_autosize: Optional[EventType[()]] = None,
  159. on_before_hover: Optional[EventType[()]] = None,
  160. on_blur: Optional[EventType[()]] = None,
  161. on_button_clicked: Optional[EventType[()]] = None,
  162. on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
  163. on_context_menu: Optional[EventType[()]] = None,
  164. on_deselect: Optional[EventType[()]] = None,
  165. on_double_click: Optional[EventType[()]] = None,
  166. on_focus: Optional[EventType[()]] = None,
  167. on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
  168. on_mount: Optional[EventType[()]] = None,
  169. on_mouse_down: Optional[EventType[()]] = None,
  170. on_mouse_enter: Optional[EventType[()]] = None,
  171. on_mouse_leave: Optional[EventType[()]] = None,
  172. on_mouse_move: Optional[EventType[()]] = None,
  173. on_mouse_out: Optional[EventType[()]] = None,
  174. on_mouse_over: Optional[EventType[()]] = None,
  175. on_mouse_up: Optional[EventType[()]] = None,
  176. on_redraw: Optional[EventType[()]] = None,
  177. on_relayout: Optional[EventType[()]] = None,
  178. on_relayouting: Optional[EventType[()]] = None,
  179. on_restyle: Optional[EventType[()]] = None,
  180. on_scroll: Optional[EventType[()]] = None,
  181. on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
  182. on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
  183. on_transition_interrupted: Optional[EventType[()]] = None,
  184. on_transitioning: Optional[EventType[()]] = None,
  185. on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
  186. on_unmount: Optional[EventType[()]] = None,
  187. **props,
  188. ) -> "PlotlyBasic":
  189. """Create the Plotly component.
  190. Args:
  191. *children: The children of the component.
  192. data: The figure to display. This can be a plotly figure or a plotly data json.
  193. layout: The layout of the graph.
  194. template: The template for visual appearance of the graph.
  195. config: The config of the graph.
  196. use_resize_handler: If true, the graph will resize when the window is resized.
  197. on_after_plot: Fired after the plot is redrawn.
  198. on_animated: Fired after the plot was animated.
  199. on_animating_frame: Fired while animating a single frame (does not currently pass data through).
  200. on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
  201. on_autosize: Fired when the plot is responsively sized.
  202. on_before_hover: Fired whenever mouse moves over a plot.
  203. on_button_clicked: Fired when a plotly UI button is clicked.
  204. on_click: Fired when the plot is clicked.
  205. on_deselect: Fired when a selection is cleared (via double click).
  206. on_double_click: Fired when the plot is double clicked.
  207. on_hover: Fired when a plot element is hovered over.
  208. on_relayout: Fired after the plot is laid out (zoom, pan, etc).
  209. on_relayouting: Fired while the plot is being laid out.
  210. on_restyle: Fired after the plot style is changed.
  211. on_redraw: Fired after the plot is redrawn.
  212. on_selected: Fired after selecting plot elements.
  213. on_selecting: Fired while dragging a selection.
  214. on_transitioning: Fired while an animation is occurring.
  215. on_transition_interrupted: Fired when a transition is stopped early.
  216. on_unhover: Fired when a hovered element is no longer hovered.
  217. style: The style of the component.
  218. key: A unique key for the component.
  219. id: The id for the component.
  220. class_name: The class name for the component.
  221. autofocus: Whether the component should take the focus once the page is loaded
  222. custom_attrs: custom attribute
  223. **props: The properties of the component.
  224. Returns:
  225. The Plotly component.
  226. """
  227. ...
  228. class PlotlyCartesian(Plotly):
  229. def add_imports(self) -> ImportDict | list[ImportDict]: ...
  230. @overload
  231. @classmethod
  232. def create( # type: ignore
  233. cls,
  234. *children,
  235. data: Figure | Var[Figure] | None = None, # type: ignore
  236. layout: Dict | Var[Dict] | None = None,
  237. template: Template | Var[Template] | None = None, # type: ignore
  238. config: Dict | Var[Dict] | None = None,
  239. use_resize_handler: Var[bool] | bool | None = None,
  240. style: Style | None = None,
  241. key: Any | None = None,
  242. id: Any | None = None,
  243. class_name: Any | None = None,
  244. autofocus: bool | None = None,
  245. custom_attrs: dict[str, Var | Any] | None = None,
  246. on_after_plot: Optional[EventType[()]] = None,
  247. on_animated: Optional[EventType[()]] = None,
  248. on_animating_frame: Optional[EventType[()]] = None,
  249. on_animation_interrupted: Optional[EventType[()]] = None,
  250. on_autosize: Optional[EventType[()]] = None,
  251. on_before_hover: Optional[EventType[()]] = None,
  252. on_blur: Optional[EventType[()]] = None,
  253. on_button_clicked: Optional[EventType[()]] = None,
  254. on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
  255. on_context_menu: Optional[EventType[()]] = None,
  256. on_deselect: Optional[EventType[()]] = None,
  257. on_double_click: Optional[EventType[()]] = None,
  258. on_focus: Optional[EventType[()]] = None,
  259. on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
  260. on_mount: Optional[EventType[()]] = None,
  261. on_mouse_down: Optional[EventType[()]] = None,
  262. on_mouse_enter: Optional[EventType[()]] = None,
  263. on_mouse_leave: Optional[EventType[()]] = None,
  264. on_mouse_move: Optional[EventType[()]] = None,
  265. on_mouse_out: Optional[EventType[()]] = None,
  266. on_mouse_over: Optional[EventType[()]] = None,
  267. on_mouse_up: Optional[EventType[()]] = None,
  268. on_redraw: Optional[EventType[()]] = None,
  269. on_relayout: Optional[EventType[()]] = None,
  270. on_relayouting: Optional[EventType[()]] = None,
  271. on_restyle: Optional[EventType[()]] = None,
  272. on_scroll: Optional[EventType[()]] = None,
  273. on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
  274. on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
  275. on_transition_interrupted: Optional[EventType[()]] = None,
  276. on_transitioning: Optional[EventType[()]] = None,
  277. on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
  278. on_unmount: Optional[EventType[()]] = None,
  279. **props,
  280. ) -> "PlotlyCartesian":
  281. """Create the Plotly component.
  282. Args:
  283. *children: The children of the component.
  284. data: The figure to display. This can be a plotly figure or a plotly data json.
  285. layout: The layout of the graph.
  286. template: The template for visual appearance of the graph.
  287. config: The config of the graph.
  288. use_resize_handler: If true, the graph will resize when the window is resized.
  289. on_after_plot: Fired after the plot is redrawn.
  290. on_animated: Fired after the plot was animated.
  291. on_animating_frame: Fired while animating a single frame (does not currently pass data through).
  292. on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
  293. on_autosize: Fired when the plot is responsively sized.
  294. on_before_hover: Fired whenever mouse moves over a plot.
  295. on_button_clicked: Fired when a plotly UI button is clicked.
  296. on_click: Fired when the plot is clicked.
  297. on_deselect: Fired when a selection is cleared (via double click).
  298. on_double_click: Fired when the plot is double clicked.
  299. on_hover: Fired when a plot element is hovered over.
  300. on_relayout: Fired after the plot is laid out (zoom, pan, etc).
  301. on_relayouting: Fired while the plot is being laid out.
  302. on_restyle: Fired after the plot style is changed.
  303. on_redraw: Fired after the plot is redrawn.
  304. on_selected: Fired after selecting plot elements.
  305. on_selecting: Fired while dragging a selection.
  306. on_transitioning: Fired while an animation is occurring.
  307. on_transition_interrupted: Fired when a transition is stopped early.
  308. on_unhover: Fired when a hovered element is no longer hovered.
  309. style: The style of the component.
  310. key: A unique key for the component.
  311. id: The id for the component.
  312. class_name: The class name for the component.
  313. autofocus: Whether the component should take the focus once the page is loaded
  314. custom_attrs: custom attribute
  315. **props: The properties of the component.
  316. Returns:
  317. The Plotly component.
  318. """
  319. ...
  320. class PlotlyGeo(Plotly):
  321. def add_imports(self) -> ImportDict | list[ImportDict]: ...
  322. @overload
  323. @classmethod
  324. def create( # type: ignore
  325. cls,
  326. *children,
  327. data: Figure | Var[Figure] | None = None, # type: ignore
  328. layout: Dict | Var[Dict] | None = None,
  329. template: Template | Var[Template] | None = None, # type: ignore
  330. config: Dict | Var[Dict] | None = None,
  331. use_resize_handler: Var[bool] | bool | None = None,
  332. style: Style | None = None,
  333. key: Any | None = None,
  334. id: Any | None = None,
  335. class_name: Any | None = None,
  336. autofocus: bool | None = None,
  337. custom_attrs: dict[str, Var | Any] | None = None,
  338. on_after_plot: Optional[EventType[()]] = None,
  339. on_animated: Optional[EventType[()]] = None,
  340. on_animating_frame: Optional[EventType[()]] = None,
  341. on_animation_interrupted: Optional[EventType[()]] = None,
  342. on_autosize: Optional[EventType[()]] = None,
  343. on_before_hover: Optional[EventType[()]] = None,
  344. on_blur: Optional[EventType[()]] = None,
  345. on_button_clicked: Optional[EventType[()]] = None,
  346. on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
  347. on_context_menu: Optional[EventType[()]] = None,
  348. on_deselect: Optional[EventType[()]] = None,
  349. on_double_click: Optional[EventType[()]] = None,
  350. on_focus: Optional[EventType[()]] = None,
  351. on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
  352. on_mount: Optional[EventType[()]] = None,
  353. on_mouse_down: Optional[EventType[()]] = None,
  354. on_mouse_enter: Optional[EventType[()]] = None,
  355. on_mouse_leave: Optional[EventType[()]] = None,
  356. on_mouse_move: Optional[EventType[()]] = None,
  357. on_mouse_out: Optional[EventType[()]] = None,
  358. on_mouse_over: Optional[EventType[()]] = None,
  359. on_mouse_up: Optional[EventType[()]] = None,
  360. on_redraw: Optional[EventType[()]] = None,
  361. on_relayout: Optional[EventType[()]] = None,
  362. on_relayouting: Optional[EventType[()]] = None,
  363. on_restyle: Optional[EventType[()]] = None,
  364. on_scroll: Optional[EventType[()]] = None,
  365. on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
  366. on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
  367. on_transition_interrupted: Optional[EventType[()]] = None,
  368. on_transitioning: Optional[EventType[()]] = None,
  369. on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
  370. on_unmount: Optional[EventType[()]] = None,
  371. **props,
  372. ) -> "PlotlyGeo":
  373. """Create the Plotly component.
  374. Args:
  375. *children: The children of the component.
  376. data: The figure to display. This can be a plotly figure or a plotly data json.
  377. layout: The layout of the graph.
  378. template: The template for visual appearance of the graph.
  379. config: The config of the graph.
  380. use_resize_handler: If true, the graph will resize when the window is resized.
  381. on_after_plot: Fired after the plot is redrawn.
  382. on_animated: Fired after the plot was animated.
  383. on_animating_frame: Fired while animating a single frame (does not currently pass data through).
  384. on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
  385. on_autosize: Fired when the plot is responsively sized.
  386. on_before_hover: Fired whenever mouse moves over a plot.
  387. on_button_clicked: Fired when a plotly UI button is clicked.
  388. on_click: Fired when the plot is clicked.
  389. on_deselect: Fired when a selection is cleared (via double click).
  390. on_double_click: Fired when the plot is double clicked.
  391. on_hover: Fired when a plot element is hovered over.
  392. on_relayout: Fired after the plot is laid out (zoom, pan, etc).
  393. on_relayouting: Fired while the plot is being laid out.
  394. on_restyle: Fired after the plot style is changed.
  395. on_redraw: Fired after the plot is redrawn.
  396. on_selected: Fired after selecting plot elements.
  397. on_selecting: Fired while dragging a selection.
  398. on_transitioning: Fired while an animation is occurring.
  399. on_transition_interrupted: Fired when a transition is stopped early.
  400. on_unhover: Fired when a hovered element is no longer hovered.
  401. style: The style of the component.
  402. key: A unique key for the component.
  403. id: The id for the component.
  404. class_name: The class name for the component.
  405. autofocus: Whether the component should take the focus once the page is loaded
  406. custom_attrs: custom attribute
  407. **props: The properties of the component.
  408. Returns:
  409. The Plotly component.
  410. """
  411. ...
  412. class PlotlyGl3d(Plotly):
  413. def add_imports(self) -> ImportDict | list[ImportDict]: ...
  414. @overload
  415. @classmethod
  416. def create( # type: ignore
  417. cls,
  418. *children,
  419. data: Figure | Var[Figure] | None = None, # type: ignore
  420. layout: Dict | Var[Dict] | None = None,
  421. template: Template | Var[Template] | None = None, # type: ignore
  422. config: Dict | Var[Dict] | None = None,
  423. use_resize_handler: Var[bool] | bool | None = None,
  424. style: Style | None = None,
  425. key: Any | None = None,
  426. id: Any | None = None,
  427. class_name: Any | None = None,
  428. autofocus: bool | None = None,
  429. custom_attrs: dict[str, Var | Any] | None = None,
  430. on_after_plot: Optional[EventType[()]] = None,
  431. on_animated: Optional[EventType[()]] = None,
  432. on_animating_frame: Optional[EventType[()]] = None,
  433. on_animation_interrupted: Optional[EventType[()]] = None,
  434. on_autosize: Optional[EventType[()]] = None,
  435. on_before_hover: Optional[EventType[()]] = None,
  436. on_blur: Optional[EventType[()]] = None,
  437. on_button_clicked: Optional[EventType[()]] = None,
  438. on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
  439. on_context_menu: Optional[EventType[()]] = None,
  440. on_deselect: Optional[EventType[()]] = None,
  441. on_double_click: Optional[EventType[()]] = None,
  442. on_focus: Optional[EventType[()]] = None,
  443. on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
  444. on_mount: Optional[EventType[()]] = None,
  445. on_mouse_down: Optional[EventType[()]] = None,
  446. on_mouse_enter: Optional[EventType[()]] = None,
  447. on_mouse_leave: Optional[EventType[()]] = None,
  448. on_mouse_move: Optional[EventType[()]] = None,
  449. on_mouse_out: Optional[EventType[()]] = None,
  450. on_mouse_over: Optional[EventType[()]] = None,
  451. on_mouse_up: Optional[EventType[()]] = None,
  452. on_redraw: Optional[EventType[()]] = None,
  453. on_relayout: Optional[EventType[()]] = None,
  454. on_relayouting: Optional[EventType[()]] = None,
  455. on_restyle: Optional[EventType[()]] = None,
  456. on_scroll: Optional[EventType[()]] = None,
  457. on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
  458. on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
  459. on_transition_interrupted: Optional[EventType[()]] = None,
  460. on_transitioning: Optional[EventType[()]] = None,
  461. on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
  462. on_unmount: Optional[EventType[()]] = None,
  463. **props,
  464. ) -> "PlotlyGl3d":
  465. """Create the Plotly component.
  466. Args:
  467. *children: The children of the component.
  468. data: The figure to display. This can be a plotly figure or a plotly data json.
  469. layout: The layout of the graph.
  470. template: The template for visual appearance of the graph.
  471. config: The config of the graph.
  472. use_resize_handler: If true, the graph will resize when the window is resized.
  473. on_after_plot: Fired after the plot is redrawn.
  474. on_animated: Fired after the plot was animated.
  475. on_animating_frame: Fired while animating a single frame (does not currently pass data through).
  476. on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
  477. on_autosize: Fired when the plot is responsively sized.
  478. on_before_hover: Fired whenever mouse moves over a plot.
  479. on_button_clicked: Fired when a plotly UI button is clicked.
  480. on_click: Fired when the plot is clicked.
  481. on_deselect: Fired when a selection is cleared (via double click).
  482. on_double_click: Fired when the plot is double clicked.
  483. on_hover: Fired when a plot element is hovered over.
  484. on_relayout: Fired after the plot is laid out (zoom, pan, etc).
  485. on_relayouting: Fired while the plot is being laid out.
  486. on_restyle: Fired after the plot style is changed.
  487. on_redraw: Fired after the plot is redrawn.
  488. on_selected: Fired after selecting plot elements.
  489. on_selecting: Fired while dragging a selection.
  490. on_transitioning: Fired while an animation is occurring.
  491. on_transition_interrupted: Fired when a transition is stopped early.
  492. on_unhover: Fired when a hovered element is no longer hovered.
  493. style: The style of the component.
  494. key: A unique key for the component.
  495. id: The id for the component.
  496. class_name: The class name for the component.
  497. autofocus: Whether the component should take the focus once the page is loaded
  498. custom_attrs: custom attribute
  499. **props: The properties of the component.
  500. Returns:
  501. The Plotly component.
  502. """
  503. ...
  504. class PlotlyGl2d(Plotly):
  505. def add_imports(self) -> ImportDict | list[ImportDict]: ...
  506. @overload
  507. @classmethod
  508. def create( # type: ignore
  509. cls,
  510. *children,
  511. data: Figure | Var[Figure] | None = None, # type: ignore
  512. layout: Dict | Var[Dict] | None = None,
  513. template: Template | Var[Template] | None = None, # type: ignore
  514. config: Dict | Var[Dict] | None = None,
  515. use_resize_handler: Var[bool] | bool | None = None,
  516. style: Style | None = None,
  517. key: Any | None = None,
  518. id: Any | None = None,
  519. class_name: Any | None = None,
  520. autofocus: bool | None = None,
  521. custom_attrs: dict[str, Var | Any] | None = None,
  522. on_after_plot: Optional[EventType[()]] = None,
  523. on_animated: Optional[EventType[()]] = None,
  524. on_animating_frame: Optional[EventType[()]] = None,
  525. on_animation_interrupted: Optional[EventType[()]] = None,
  526. on_autosize: Optional[EventType[()]] = None,
  527. on_before_hover: Optional[EventType[()]] = None,
  528. on_blur: Optional[EventType[()]] = None,
  529. on_button_clicked: Optional[EventType[()]] = None,
  530. on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
  531. on_context_menu: Optional[EventType[()]] = None,
  532. on_deselect: Optional[EventType[()]] = None,
  533. on_double_click: Optional[EventType[()]] = None,
  534. on_focus: Optional[EventType[()]] = None,
  535. on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
  536. on_mount: Optional[EventType[()]] = None,
  537. on_mouse_down: Optional[EventType[()]] = None,
  538. on_mouse_enter: Optional[EventType[()]] = None,
  539. on_mouse_leave: Optional[EventType[()]] = None,
  540. on_mouse_move: Optional[EventType[()]] = None,
  541. on_mouse_out: Optional[EventType[()]] = None,
  542. on_mouse_over: Optional[EventType[()]] = None,
  543. on_mouse_up: Optional[EventType[()]] = None,
  544. on_redraw: Optional[EventType[()]] = None,
  545. on_relayout: Optional[EventType[()]] = None,
  546. on_relayouting: Optional[EventType[()]] = None,
  547. on_restyle: Optional[EventType[()]] = None,
  548. on_scroll: Optional[EventType[()]] = None,
  549. on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
  550. on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
  551. on_transition_interrupted: Optional[EventType[()]] = None,
  552. on_transitioning: Optional[EventType[()]] = None,
  553. on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
  554. on_unmount: Optional[EventType[()]] = None,
  555. **props,
  556. ) -> "PlotlyGl2d":
  557. """Create the Plotly component.
  558. Args:
  559. *children: The children of the component.
  560. data: The figure to display. This can be a plotly figure or a plotly data json.
  561. layout: The layout of the graph.
  562. template: The template for visual appearance of the graph.
  563. config: The config of the graph.
  564. use_resize_handler: If true, the graph will resize when the window is resized.
  565. on_after_plot: Fired after the plot is redrawn.
  566. on_animated: Fired after the plot was animated.
  567. on_animating_frame: Fired while animating a single frame (does not currently pass data through).
  568. on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
  569. on_autosize: Fired when the plot is responsively sized.
  570. on_before_hover: Fired whenever mouse moves over a plot.
  571. on_button_clicked: Fired when a plotly UI button is clicked.
  572. on_click: Fired when the plot is clicked.
  573. on_deselect: Fired when a selection is cleared (via double click).
  574. on_double_click: Fired when the plot is double clicked.
  575. on_hover: Fired when a plot element is hovered over.
  576. on_relayout: Fired after the plot is laid out (zoom, pan, etc).
  577. on_relayouting: Fired while the plot is being laid out.
  578. on_restyle: Fired after the plot style is changed.
  579. on_redraw: Fired after the plot is redrawn.
  580. on_selected: Fired after selecting plot elements.
  581. on_selecting: Fired while dragging a selection.
  582. on_transitioning: Fired while an animation is occurring.
  583. on_transition_interrupted: Fired when a transition is stopped early.
  584. on_unhover: Fired when a hovered element is no longer hovered.
  585. style: The style of the component.
  586. key: A unique key for the component.
  587. id: The id for the component.
  588. class_name: The class name for the component.
  589. autofocus: Whether the component should take the focus once the page is loaded
  590. custom_attrs: custom attribute
  591. **props: The properties of the component.
  592. Returns:
  593. The Plotly component.
  594. """
  595. ...
  596. class PlotlyMapbox(Plotly):
  597. def add_imports(self) -> ImportDict | list[ImportDict]: ...
  598. @overload
  599. @classmethod
  600. def create( # type: ignore
  601. cls,
  602. *children,
  603. data: Figure | Var[Figure] | None = None, # type: ignore
  604. layout: Dict | Var[Dict] | None = None,
  605. template: Template | Var[Template] | None = None, # type: ignore
  606. config: Dict | Var[Dict] | None = None,
  607. use_resize_handler: Var[bool] | bool | None = None,
  608. style: Style | None = None,
  609. key: Any | None = None,
  610. id: Any | None = None,
  611. class_name: Any | None = None,
  612. autofocus: bool | None = None,
  613. custom_attrs: dict[str, Var | Any] | None = None,
  614. on_after_plot: Optional[EventType[()]] = None,
  615. on_animated: Optional[EventType[()]] = None,
  616. on_animating_frame: Optional[EventType[()]] = None,
  617. on_animation_interrupted: Optional[EventType[()]] = None,
  618. on_autosize: Optional[EventType[()]] = None,
  619. on_before_hover: Optional[EventType[()]] = None,
  620. on_blur: Optional[EventType[()]] = None,
  621. on_button_clicked: Optional[EventType[()]] = None,
  622. on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
  623. on_context_menu: Optional[EventType[()]] = None,
  624. on_deselect: Optional[EventType[()]] = None,
  625. on_double_click: Optional[EventType[()]] = None,
  626. on_focus: Optional[EventType[()]] = None,
  627. on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
  628. on_mount: Optional[EventType[()]] = None,
  629. on_mouse_down: Optional[EventType[()]] = None,
  630. on_mouse_enter: Optional[EventType[()]] = None,
  631. on_mouse_leave: Optional[EventType[()]] = None,
  632. on_mouse_move: Optional[EventType[()]] = None,
  633. on_mouse_out: Optional[EventType[()]] = None,
  634. on_mouse_over: Optional[EventType[()]] = None,
  635. on_mouse_up: Optional[EventType[()]] = None,
  636. on_redraw: Optional[EventType[()]] = None,
  637. on_relayout: Optional[EventType[()]] = None,
  638. on_relayouting: Optional[EventType[()]] = None,
  639. on_restyle: Optional[EventType[()]] = None,
  640. on_scroll: Optional[EventType[()]] = None,
  641. on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
  642. on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
  643. on_transition_interrupted: Optional[EventType[()]] = None,
  644. on_transitioning: Optional[EventType[()]] = None,
  645. on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
  646. on_unmount: Optional[EventType[()]] = None,
  647. **props,
  648. ) -> "PlotlyMapbox":
  649. """Create the Plotly component.
  650. Args:
  651. *children: The children of the component.
  652. data: The figure to display. This can be a plotly figure or a plotly data json.
  653. layout: The layout of the graph.
  654. template: The template for visual appearance of the graph.
  655. config: The config of the graph.
  656. use_resize_handler: If true, the graph will resize when the window is resized.
  657. on_after_plot: Fired after the plot is redrawn.
  658. on_animated: Fired after the plot was animated.
  659. on_animating_frame: Fired while animating a single frame (does not currently pass data through).
  660. on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
  661. on_autosize: Fired when the plot is responsively sized.
  662. on_before_hover: Fired whenever mouse moves over a plot.
  663. on_button_clicked: Fired when a plotly UI button is clicked.
  664. on_click: Fired when the plot is clicked.
  665. on_deselect: Fired when a selection is cleared (via double click).
  666. on_double_click: Fired when the plot is double clicked.
  667. on_hover: Fired when a plot element is hovered over.
  668. on_relayout: Fired after the plot is laid out (zoom, pan, etc).
  669. on_relayouting: Fired while the plot is being laid out.
  670. on_restyle: Fired after the plot style is changed.
  671. on_redraw: Fired after the plot is redrawn.
  672. on_selected: Fired after selecting plot elements.
  673. on_selecting: Fired while dragging a selection.
  674. on_transitioning: Fired while an animation is occurring.
  675. on_transition_interrupted: Fired when a transition is stopped early.
  676. on_unhover: Fired when a hovered element is no longer hovered.
  677. style: The style of the component.
  678. key: A unique key for the component.
  679. id: The id for the component.
  680. class_name: The class name for the component.
  681. autofocus: Whether the component should take the focus once the page is loaded
  682. custom_attrs: custom attribute
  683. **props: The properties of the component.
  684. Returns:
  685. The Plotly component.
  686. """
  687. ...
  688. class PlotlyFinance(Plotly):
  689. def add_imports(self) -> ImportDict | list[ImportDict]: ...
  690. @overload
  691. @classmethod
  692. def create( # type: ignore
  693. cls,
  694. *children,
  695. data: Figure | Var[Figure] | None = None, # type: ignore
  696. layout: Dict | Var[Dict] | None = None,
  697. template: Template | Var[Template] | None = None, # type: ignore
  698. config: Dict | Var[Dict] | None = None,
  699. use_resize_handler: Var[bool] | bool | None = None,
  700. style: Style | None = None,
  701. key: Any | None = None,
  702. id: Any | None = None,
  703. class_name: Any | None = None,
  704. autofocus: bool | None = None,
  705. custom_attrs: dict[str, Var | Any] | None = None,
  706. on_after_plot: Optional[EventType[()]] = None,
  707. on_animated: Optional[EventType[()]] = None,
  708. on_animating_frame: Optional[EventType[()]] = None,
  709. on_animation_interrupted: Optional[EventType[()]] = None,
  710. on_autosize: Optional[EventType[()]] = None,
  711. on_before_hover: Optional[EventType[()]] = None,
  712. on_blur: Optional[EventType[()]] = None,
  713. on_button_clicked: Optional[EventType[()]] = None,
  714. on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
  715. on_context_menu: Optional[EventType[()]] = None,
  716. on_deselect: Optional[EventType[()]] = None,
  717. on_double_click: Optional[EventType[()]] = None,
  718. on_focus: Optional[EventType[()]] = None,
  719. on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
  720. on_mount: Optional[EventType[()]] = None,
  721. on_mouse_down: Optional[EventType[()]] = None,
  722. on_mouse_enter: Optional[EventType[()]] = None,
  723. on_mouse_leave: Optional[EventType[()]] = None,
  724. on_mouse_move: Optional[EventType[()]] = None,
  725. on_mouse_out: Optional[EventType[()]] = None,
  726. on_mouse_over: Optional[EventType[()]] = None,
  727. on_mouse_up: Optional[EventType[()]] = None,
  728. on_redraw: Optional[EventType[()]] = None,
  729. on_relayout: Optional[EventType[()]] = None,
  730. on_relayouting: Optional[EventType[()]] = None,
  731. on_restyle: Optional[EventType[()]] = None,
  732. on_scroll: Optional[EventType[()]] = None,
  733. on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
  734. on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
  735. on_transition_interrupted: Optional[EventType[()]] = None,
  736. on_transitioning: Optional[EventType[()]] = None,
  737. on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
  738. on_unmount: Optional[EventType[()]] = None,
  739. **props,
  740. ) -> "PlotlyFinance":
  741. """Create the Plotly component.
  742. Args:
  743. *children: The children of the component.
  744. data: The figure to display. This can be a plotly figure or a plotly data json.
  745. layout: The layout of the graph.
  746. template: The template for visual appearance of the graph.
  747. config: The config of the graph.
  748. use_resize_handler: If true, the graph will resize when the window is resized.
  749. on_after_plot: Fired after the plot is redrawn.
  750. on_animated: Fired after the plot was animated.
  751. on_animating_frame: Fired while animating a single frame (does not currently pass data through).
  752. on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
  753. on_autosize: Fired when the plot is responsively sized.
  754. on_before_hover: Fired whenever mouse moves over a plot.
  755. on_button_clicked: Fired when a plotly UI button is clicked.
  756. on_click: Fired when the plot is clicked.
  757. on_deselect: Fired when a selection is cleared (via double click).
  758. on_double_click: Fired when the plot is double clicked.
  759. on_hover: Fired when a plot element is hovered over.
  760. on_relayout: Fired after the plot is laid out (zoom, pan, etc).
  761. on_relayouting: Fired while the plot is being laid out.
  762. on_restyle: Fired after the plot style is changed.
  763. on_redraw: Fired after the plot is redrawn.
  764. on_selected: Fired after selecting plot elements.
  765. on_selecting: Fired while dragging a selection.
  766. on_transitioning: Fired while an animation is occurring.
  767. on_transition_interrupted: Fired when a transition is stopped early.
  768. on_unhover: Fired when a hovered element is no longer hovered.
  769. style: The style of the component.
  770. key: A unique key for the component.
  771. id: The id for the component.
  772. class_name: The class name for the component.
  773. autofocus: Whether the component should take the focus once the page is loaded
  774. custom_attrs: custom attribute
  775. **props: The properties of the component.
  776. Returns:
  777. The Plotly component.
  778. """
  779. ...
  780. class PlotlyStrict(Plotly):
  781. def add_imports(self) -> ImportDict | list[ImportDict]: ...
  782. @overload
  783. @classmethod
  784. def create( # type: ignore
  785. cls,
  786. *children,
  787. data: Figure | Var[Figure] | None = None, # type: ignore
  788. layout: Dict | Var[Dict] | None = None,
  789. template: Template | Var[Template] | None = None, # type: ignore
  790. config: Dict | Var[Dict] | None = None,
  791. use_resize_handler: Var[bool] | bool | None = None,
  792. style: Style | None = None,
  793. key: Any | None = None,
  794. id: Any | None = None,
  795. class_name: Any | None = None,
  796. autofocus: bool | None = None,
  797. custom_attrs: dict[str, Var | Any] | None = None,
  798. on_after_plot: Optional[EventType[()]] = None,
  799. on_animated: Optional[EventType[()]] = None,
  800. on_animating_frame: Optional[EventType[()]] = None,
  801. on_animation_interrupted: Optional[EventType[()]] = None,
  802. on_autosize: Optional[EventType[()]] = None,
  803. on_before_hover: Optional[EventType[()]] = None,
  804. on_blur: Optional[EventType[()]] = None,
  805. on_button_clicked: Optional[EventType[()]] = None,
  806. on_click: Optional[EventType[()] | EventType[list[Point]]] = None,
  807. on_context_menu: Optional[EventType[()]] = None,
  808. on_deselect: Optional[EventType[()]] = None,
  809. on_double_click: Optional[EventType[()]] = None,
  810. on_focus: Optional[EventType[()]] = None,
  811. on_hover: Optional[EventType[()] | EventType[list[Point]]] = None,
  812. on_mount: Optional[EventType[()]] = None,
  813. on_mouse_down: Optional[EventType[()]] = None,
  814. on_mouse_enter: Optional[EventType[()]] = None,
  815. on_mouse_leave: Optional[EventType[()]] = None,
  816. on_mouse_move: Optional[EventType[()]] = None,
  817. on_mouse_out: Optional[EventType[()]] = None,
  818. on_mouse_over: Optional[EventType[()]] = None,
  819. on_mouse_up: Optional[EventType[()]] = None,
  820. on_redraw: Optional[EventType[()]] = None,
  821. on_relayout: Optional[EventType[()]] = None,
  822. on_relayouting: Optional[EventType[()]] = None,
  823. on_restyle: Optional[EventType[()]] = None,
  824. on_scroll: Optional[EventType[()]] = None,
  825. on_selected: Optional[EventType[()] | EventType[list[Point]]] = None,
  826. on_selecting: Optional[EventType[()] | EventType[list[Point]]] = None,
  827. on_transition_interrupted: Optional[EventType[()]] = None,
  828. on_transitioning: Optional[EventType[()]] = None,
  829. on_unhover: Optional[EventType[()] | EventType[list[Point]]] = None,
  830. on_unmount: Optional[EventType[()]] = None,
  831. **props,
  832. ) -> "PlotlyStrict":
  833. """Create the Plotly component.
  834. Args:
  835. *children: The children of the component.
  836. data: The figure to display. This can be a plotly figure or a plotly data json.
  837. layout: The layout of the graph.
  838. template: The template for visual appearance of the graph.
  839. config: The config of the graph.
  840. use_resize_handler: If true, the graph will resize when the window is resized.
  841. on_after_plot: Fired after the plot is redrawn.
  842. on_animated: Fired after the plot was animated.
  843. on_animating_frame: Fired while animating a single frame (does not currently pass data through).
  844. on_animation_interrupted: Fired when an animation is interrupted (to start a new animation for example).
  845. on_autosize: Fired when the plot is responsively sized.
  846. on_before_hover: Fired whenever mouse moves over a plot.
  847. on_button_clicked: Fired when a plotly UI button is clicked.
  848. on_click: Fired when the plot is clicked.
  849. on_deselect: Fired when a selection is cleared (via double click).
  850. on_double_click: Fired when the plot is double clicked.
  851. on_hover: Fired when a plot element is hovered over.
  852. on_relayout: Fired after the plot is laid out (zoom, pan, etc).
  853. on_relayouting: Fired while the plot is being laid out.
  854. on_restyle: Fired after the plot style is changed.
  855. on_redraw: Fired after the plot is redrawn.
  856. on_selected: Fired after selecting plot elements.
  857. on_selecting: Fired while dragging a selection.
  858. on_transitioning: Fired while an animation is occurring.
  859. on_transition_interrupted: Fired when a transition is stopped early.
  860. on_unhover: Fired when a hovered element is no longer hovered.
  861. style: The style of the component.
  862. key: A unique key for the component.
  863. id: The id for the component.
  864. class_name: The class name for the component.
  865. autofocus: Whether the component should take the focus once the page is loaded
  866. custom_attrs: custom attribute
  867. **props: The properties of the component.
  868. Returns:
  869. The Plotly component.
  870. """
  871. ...