plotly.pyi 47 KB

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