plotly.pyi 47 KB

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