general.pyi 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  1. """Stub file for reflex/components/recharts/general.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `scripts/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, Literal, Optional, Union, overload
  6. from reflex.vars import Var, BaseVar, ComputedVar
  7. from reflex.event import EventChain, EventHandler, EventSpec
  8. from reflex.style import Style
  9. from typing import Any, Dict, List, Union
  10. from reflex.components.component import MemoizationLeaf
  11. from reflex.constants import EventTriggers
  12. from reflex.vars import Var
  13. from .recharts import (
  14. LiteralIconType,
  15. LiteralLayout,
  16. LiteralLegendAlign,
  17. LiteralPosition,
  18. LiteralVerticalAlign,
  19. Recharts,
  20. )
  21. class ResponsiveContainer(Recharts, MemoizationLeaf):
  22. @overload
  23. @classmethod
  24. def create( # type: ignore
  25. cls,
  26. *children,
  27. aspect: Optional[Union[Var[int], int]] = None,
  28. width: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
  29. height: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
  30. min_width: Optional[Union[Var[int], int]] = None,
  31. min_height: Optional[Union[Var[int], int]] = None,
  32. debounce: Optional[Union[Var[int], int]] = None,
  33. style: Optional[Style] = None,
  34. key: Optional[Any] = None,
  35. id: Optional[Any] = None,
  36. class_name: Optional[Any] = None,
  37. autofocus: Optional[bool] = None,
  38. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  39. on_blur: Optional[
  40. Union[EventHandler, EventSpec, list, function, BaseVar]
  41. ] = None,
  42. on_click: Optional[
  43. Union[EventHandler, EventSpec, list, function, BaseVar]
  44. ] = None,
  45. on_context_menu: Optional[
  46. Union[EventHandler, EventSpec, list, function, BaseVar]
  47. ] = None,
  48. on_double_click: Optional[
  49. Union[EventHandler, EventSpec, list, function, BaseVar]
  50. ] = None,
  51. on_focus: Optional[
  52. Union[EventHandler, EventSpec, list, function, BaseVar]
  53. ] = None,
  54. on_mount: Optional[
  55. Union[EventHandler, EventSpec, list, function, BaseVar]
  56. ] = None,
  57. on_mouse_down: Optional[
  58. Union[EventHandler, EventSpec, list, function, BaseVar]
  59. ] = None,
  60. on_mouse_enter: Optional[
  61. Union[EventHandler, EventSpec, list, function, BaseVar]
  62. ] = None,
  63. on_mouse_leave: Optional[
  64. Union[EventHandler, EventSpec, list, function, BaseVar]
  65. ] = None,
  66. on_mouse_move: Optional[
  67. Union[EventHandler, EventSpec, list, function, BaseVar]
  68. ] = None,
  69. on_mouse_out: Optional[
  70. Union[EventHandler, EventSpec, list, function, BaseVar]
  71. ] = None,
  72. on_mouse_over: Optional[
  73. Union[EventHandler, EventSpec, list, function, BaseVar]
  74. ] = None,
  75. on_mouse_up: Optional[
  76. Union[EventHandler, EventSpec, list, function, BaseVar]
  77. ] = None,
  78. on_scroll: Optional[
  79. Union[EventHandler, EventSpec, list, function, BaseVar]
  80. ] = None,
  81. on_unmount: Optional[
  82. Union[EventHandler, EventSpec, list, function, BaseVar]
  83. ] = None,
  84. **props
  85. ) -> "ResponsiveContainer":
  86. """Create a new memoization leaf component.
  87. Args:
  88. *children: The children of the component.
  89. aspect: The aspect ratio of the container. The final aspect ratio of the SVG element will be (width / height) * aspect. Number
  90. width: The width of chart container. Can be a number or string
  91. height: The height of chart container. Number
  92. min_width: The minimum width of chart container.
  93. min_height: The minimum height of chart container. Number
  94. debounce: If specified a positive number, debounced function will be used to handle the resize event.
  95. style: The style of the component.
  96. key: A unique key for the component.
  97. id: The id for the component.
  98. class_name: The class name for the component.
  99. autofocus: Whether the component should take the focus once the page is loaded
  100. custom_attrs: custom attribute
  101. **props: The props of the component.
  102. Returns:
  103. The memoization leaf
  104. """
  105. ...
  106. class Legend(Recharts):
  107. def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
  108. @overload
  109. @classmethod
  110. def create( # type: ignore
  111. cls,
  112. *children,
  113. width: Optional[Union[Var[int], int]] = None,
  114. height: Optional[Union[Var[int], int]] = None,
  115. layout: Optional[
  116. Union[
  117. Var[Literal["horizontal", "vertical"]],
  118. Literal["horizontal", "vertical"],
  119. ]
  120. ] = None,
  121. align: Optional[
  122. Union[
  123. Var[Literal["left", "center", "right"]],
  124. Literal["left", "center", "right"],
  125. ]
  126. ] = None,
  127. vertical_align: Optional[
  128. Union[
  129. Var[Literal["top", "middle", "bottom"]],
  130. Literal["top", "middle", "bottom"],
  131. ]
  132. ] = None,
  133. icon_size: Optional[Union[Var[int], int]] = None,
  134. icon_type: Optional[
  135. Union[
  136. Var[
  137. Literal[
  138. "line",
  139. "plainline",
  140. "square",
  141. "rect",
  142. "circle",
  143. "cross",
  144. "diamond",
  145. "star",
  146. "triangle",
  147. "wye",
  148. ]
  149. ],
  150. Literal[
  151. "line",
  152. "plainline",
  153. "square",
  154. "rect",
  155. "circle",
  156. "cross",
  157. "diamond",
  158. "star",
  159. "triangle",
  160. "wye",
  161. ],
  162. ]
  163. ] = None,
  164. chart_width: Optional[Union[Var[int], int]] = None,
  165. chart_height: Optional[Union[Var[int], int]] = None,
  166. margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
  167. style: Optional[Style] = None,
  168. key: Optional[Any] = None,
  169. id: Optional[Any] = None,
  170. class_name: Optional[Any] = None,
  171. autofocus: Optional[bool] = None,
  172. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  173. on_click: Optional[
  174. Union[EventHandler, EventSpec, list, function, BaseVar]
  175. ] = None,
  176. on_mouse_enter: Optional[
  177. Union[EventHandler, EventSpec, list, function, BaseVar]
  178. ] = None,
  179. on_mouse_leave: Optional[
  180. Union[EventHandler, EventSpec, list, function, BaseVar]
  181. ] = None,
  182. on_mouse_move: Optional[
  183. Union[EventHandler, EventSpec, list, function, BaseVar]
  184. ] = None,
  185. on_mouse_out: Optional[
  186. Union[EventHandler, EventSpec, list, function, BaseVar]
  187. ] = None,
  188. on_mouse_over: Optional[
  189. Union[EventHandler, EventSpec, list, function, BaseVar]
  190. ] = None,
  191. **props
  192. ) -> "Legend":
  193. """Create the component.
  194. Args:
  195. *children: The children of the component.
  196. width: The width of legend container. Number
  197. height: The height of legend container. Number
  198. layout: The layout of legend items. 'horizontal' | 'vertical'
  199. align: The alignment of legend items in 'horizontal' direction, which can be 'left', 'center', 'right'.
  200. vertical_align: The alignment of legend items in 'vertical' direction, which can be 'top', 'middle', 'bottom'.
  201. icon_size: The size of icon in each legend item.
  202. icon_type: The type of icon in each legend item. 'line' | 'plainline' | 'square' | 'rect' | 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye'
  203. chart_width: The width of chart container, usually calculated internally.
  204. chart_height: The height of chart container, usually calculated internally.
  205. margin: The margin of chart container, usually calculated internally.
  206. style: The style of the component.
  207. key: A unique key for the component.
  208. id: The id for the component.
  209. class_name: The class name for the component.
  210. autofocus: Whether the component should take the focus once the page is loaded
  211. custom_attrs: custom attribute
  212. **props: The props of the component.
  213. Returns:
  214. The component.
  215. Raises:
  216. TypeError: If an invalid child is passed.
  217. """
  218. ...
  219. class GraphingTooltip(Recharts):
  220. @overload
  221. @classmethod
  222. def create( # type: ignore
  223. cls,
  224. *children,
  225. separator: Optional[Union[Var[str], str]] = None,
  226. offset: Optional[Union[Var[int], int]] = None,
  227. filter_null: Optional[Union[Var[bool], bool]] = None,
  228. cursor: Optional[Union[Var[bool], bool]] = None,
  229. view_box: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
  230. active: Optional[Union[Var[bool], bool]] = None,
  231. position: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
  232. coordinate: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
  233. style: Optional[Style] = None,
  234. key: Optional[Any] = None,
  235. id: Optional[Any] = None,
  236. class_name: Optional[Any] = None,
  237. autofocus: Optional[bool] = None,
  238. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  239. on_blur: Optional[
  240. Union[EventHandler, EventSpec, list, function, BaseVar]
  241. ] = None,
  242. on_click: Optional[
  243. Union[EventHandler, EventSpec, list, function, BaseVar]
  244. ] = None,
  245. on_context_menu: Optional[
  246. Union[EventHandler, EventSpec, list, function, BaseVar]
  247. ] = None,
  248. on_double_click: Optional[
  249. Union[EventHandler, EventSpec, list, function, BaseVar]
  250. ] = None,
  251. on_focus: Optional[
  252. Union[EventHandler, EventSpec, list, function, BaseVar]
  253. ] = None,
  254. on_mount: Optional[
  255. Union[EventHandler, EventSpec, list, function, BaseVar]
  256. ] = None,
  257. on_mouse_down: Optional[
  258. Union[EventHandler, EventSpec, list, function, BaseVar]
  259. ] = None,
  260. on_mouse_enter: Optional[
  261. Union[EventHandler, EventSpec, list, function, BaseVar]
  262. ] = None,
  263. on_mouse_leave: Optional[
  264. Union[EventHandler, EventSpec, list, function, BaseVar]
  265. ] = None,
  266. on_mouse_move: Optional[
  267. Union[EventHandler, EventSpec, list, function, BaseVar]
  268. ] = None,
  269. on_mouse_out: Optional[
  270. Union[EventHandler, EventSpec, list, function, BaseVar]
  271. ] = None,
  272. on_mouse_over: Optional[
  273. Union[EventHandler, EventSpec, list, function, BaseVar]
  274. ] = None,
  275. on_mouse_up: Optional[
  276. Union[EventHandler, EventSpec, list, function, BaseVar]
  277. ] = None,
  278. on_scroll: Optional[
  279. Union[EventHandler, EventSpec, list, function, BaseVar]
  280. ] = None,
  281. on_unmount: Optional[
  282. Union[EventHandler, EventSpec, list, function, BaseVar]
  283. ] = None,
  284. **props
  285. ) -> "GraphingTooltip":
  286. """Create the component.
  287. Args:
  288. *children: The children of the component.
  289. separator: The separator between name and value.
  290. offset: The offset size of tooltip. Number
  291. filter_null: When an item of the payload has value null or undefined, this item won't be displayed.
  292. cursor: If set false, no cursor will be drawn when tooltip is active.
  293. view_box: The box of viewing area, which has the shape of {x: someVal, y: someVal, width: someVal, height: someVal}, usually calculated internally.
  294. active: If set true, the tooltip is displayed. If set false, the tooltip is hidden, usually calculated internally.
  295. position: If this field is set, the tooltip position will be fixed and will not move anymore.
  296. coordinate: The coordinate of tooltip which is usually calculated internally.
  297. style: The style of the component.
  298. key: A unique key for the component.
  299. id: The id for the component.
  300. class_name: The class name for the component.
  301. autofocus: Whether the component should take the focus once the page is loaded
  302. custom_attrs: custom attribute
  303. **props: The props of the component.
  304. Returns:
  305. The component.
  306. Raises:
  307. TypeError: If an invalid child is passed.
  308. """
  309. ...
  310. class Label(Recharts):
  311. @overload
  312. @classmethod
  313. def create( # type: ignore
  314. cls,
  315. *children,
  316. view_box: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
  317. value: Optional[Union[Var[str], str]] = None,
  318. offset: Optional[Union[Var[int], int]] = None,
  319. position: Optional[
  320. Union[
  321. Var[
  322. Literal[
  323. "top",
  324. "left",
  325. "right",
  326. "bottom",
  327. "inside",
  328. "outside",
  329. "insideLeft",
  330. "insideRight",
  331. "insideTop",
  332. "insideBottom",
  333. "insideTopLeft",
  334. "insideBottomLeft",
  335. "insideTopRight",
  336. "insideBottomRight",
  337. "insideStart",
  338. "insideEnd",
  339. "end",
  340. "center",
  341. ]
  342. ],
  343. Literal[
  344. "top",
  345. "left",
  346. "right",
  347. "bottom",
  348. "inside",
  349. "outside",
  350. "insideLeft",
  351. "insideRight",
  352. "insideTop",
  353. "insideBottom",
  354. "insideTopLeft",
  355. "insideBottomLeft",
  356. "insideTopRight",
  357. "insideBottomRight",
  358. "insideStart",
  359. "insideEnd",
  360. "end",
  361. "center",
  362. ],
  363. ]
  364. ] = None,
  365. style: Optional[Style] = None,
  366. key: Optional[Any] = None,
  367. id: Optional[Any] = None,
  368. class_name: Optional[Any] = None,
  369. autofocus: Optional[bool] = None,
  370. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  371. on_blur: Optional[
  372. Union[EventHandler, EventSpec, list, function, BaseVar]
  373. ] = None,
  374. on_click: Optional[
  375. Union[EventHandler, EventSpec, list, function, BaseVar]
  376. ] = None,
  377. on_context_menu: Optional[
  378. Union[EventHandler, EventSpec, list, function, BaseVar]
  379. ] = None,
  380. on_double_click: Optional[
  381. Union[EventHandler, EventSpec, list, function, BaseVar]
  382. ] = None,
  383. on_focus: Optional[
  384. Union[EventHandler, EventSpec, list, function, BaseVar]
  385. ] = None,
  386. on_mount: Optional[
  387. Union[EventHandler, EventSpec, list, function, BaseVar]
  388. ] = None,
  389. on_mouse_down: Optional[
  390. Union[EventHandler, EventSpec, list, function, BaseVar]
  391. ] = None,
  392. on_mouse_enter: Optional[
  393. Union[EventHandler, EventSpec, list, function, BaseVar]
  394. ] = None,
  395. on_mouse_leave: Optional[
  396. Union[EventHandler, EventSpec, list, function, BaseVar]
  397. ] = None,
  398. on_mouse_move: Optional[
  399. Union[EventHandler, EventSpec, list, function, BaseVar]
  400. ] = None,
  401. on_mouse_out: Optional[
  402. Union[EventHandler, EventSpec, list, function, BaseVar]
  403. ] = None,
  404. on_mouse_over: Optional[
  405. Union[EventHandler, EventSpec, list, function, BaseVar]
  406. ] = None,
  407. on_mouse_up: Optional[
  408. Union[EventHandler, EventSpec, list, function, BaseVar]
  409. ] = None,
  410. on_scroll: Optional[
  411. Union[EventHandler, EventSpec, list, function, BaseVar]
  412. ] = None,
  413. on_unmount: Optional[
  414. Union[EventHandler, EventSpec, list, function, BaseVar]
  415. ] = None,
  416. **props
  417. ) -> "Label":
  418. """Create the component.
  419. Args:
  420. *children: The children of the component.
  421. view_box: The box of viewing area, which has the shape of {x: someVal, y: someVal, width: someVal, height: someVal}, usually calculated internally.
  422. value: The value of label, which can be specified by this props or the children of <Label />
  423. offset: The offset of label which can be specified by this props or the children of <Label />
  424. position: The position of label which can be specified by this props or the children of <Label />
  425. style: The style of the component.
  426. key: A unique key for the component.
  427. id: The id for the component.
  428. class_name: The class name for the component.
  429. autofocus: Whether the component should take the focus once the page is loaded
  430. custom_attrs: custom attribute
  431. **props: The props of the component.
  432. Returns:
  433. The component.
  434. Raises:
  435. TypeError: If an invalid child is passed.
  436. """
  437. ...
  438. class LabelList(Recharts):
  439. @overload
  440. @classmethod
  441. def create( # type: ignore
  442. cls,
  443. *children,
  444. data_key: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  445. position: Optional[
  446. Union[
  447. Var[
  448. Literal[
  449. "top",
  450. "left",
  451. "right",
  452. "bottom",
  453. "inside",
  454. "outside",
  455. "insideLeft",
  456. "insideRight",
  457. "insideTop",
  458. "insideBottom",
  459. "insideTopLeft",
  460. "insideBottomLeft",
  461. "insideTopRight",
  462. "insideBottomRight",
  463. "insideStart",
  464. "insideEnd",
  465. "end",
  466. "center",
  467. ]
  468. ],
  469. Literal[
  470. "top",
  471. "left",
  472. "right",
  473. "bottom",
  474. "inside",
  475. "outside",
  476. "insideLeft",
  477. "insideRight",
  478. "insideTop",
  479. "insideBottom",
  480. "insideTopLeft",
  481. "insideBottomLeft",
  482. "insideTopRight",
  483. "insideBottomRight",
  484. "insideStart",
  485. "insideEnd",
  486. "end",
  487. "center",
  488. ],
  489. ]
  490. ] = None,
  491. offset: Optional[Union[Var[int], int]] = None,
  492. fill: Optional[Union[Var[str], str]] = None,
  493. stroke: Optional[Union[Var[str], str]] = None,
  494. style: Optional[Style] = None,
  495. key: Optional[Any] = None,
  496. id: Optional[Any] = None,
  497. class_name: Optional[Any] = None,
  498. autofocus: Optional[bool] = None,
  499. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  500. on_blur: Optional[
  501. Union[EventHandler, EventSpec, list, function, BaseVar]
  502. ] = None,
  503. on_click: Optional[
  504. Union[EventHandler, EventSpec, list, function, BaseVar]
  505. ] = None,
  506. on_context_menu: Optional[
  507. Union[EventHandler, EventSpec, list, function, BaseVar]
  508. ] = None,
  509. on_double_click: Optional[
  510. Union[EventHandler, EventSpec, list, function, BaseVar]
  511. ] = None,
  512. on_focus: Optional[
  513. Union[EventHandler, EventSpec, list, function, BaseVar]
  514. ] = None,
  515. on_mount: Optional[
  516. Union[EventHandler, EventSpec, list, function, BaseVar]
  517. ] = None,
  518. on_mouse_down: Optional[
  519. Union[EventHandler, EventSpec, list, function, BaseVar]
  520. ] = None,
  521. on_mouse_enter: Optional[
  522. Union[EventHandler, EventSpec, list, function, BaseVar]
  523. ] = None,
  524. on_mouse_leave: Optional[
  525. Union[EventHandler, EventSpec, list, function, BaseVar]
  526. ] = None,
  527. on_mouse_move: Optional[
  528. Union[EventHandler, EventSpec, list, function, BaseVar]
  529. ] = None,
  530. on_mouse_out: Optional[
  531. Union[EventHandler, EventSpec, list, function, BaseVar]
  532. ] = None,
  533. on_mouse_over: Optional[
  534. Union[EventHandler, EventSpec, list, function, BaseVar]
  535. ] = None,
  536. on_mouse_up: Optional[
  537. Union[EventHandler, EventSpec, list, function, BaseVar]
  538. ] = None,
  539. on_scroll: Optional[
  540. Union[EventHandler, EventSpec, list, function, BaseVar]
  541. ] = None,
  542. on_unmount: Optional[
  543. Union[EventHandler, EventSpec, list, function, BaseVar]
  544. ] = None,
  545. **props
  546. ) -> "LabelList":
  547. """Create the component.
  548. Args:
  549. *children: The children of the component.
  550. data_key: The key of a group of label values in data.
  551. position: The position of each label relative to it view box。"Top" | "left" | "right" | "bottom" | "inside" | "outside" | "insideLeft" | "insideRight" | "insideTop" | "insideBottom" | "insideTopLeft" | "insideBottomLeft" | "insideTopRight" | "insideBottomRight" | "insideStart" | "insideEnd" | "end" | "center"
  552. offset: The offset to the specified "position"
  553. fill: Color of the fill
  554. stroke: Color of the stroke
  555. style: The style of the component.
  556. key: A unique key for the component.
  557. id: The id for the component.
  558. class_name: The class name for the component.
  559. autofocus: Whether the component should take the focus once the page is loaded
  560. custom_attrs: custom attribute
  561. **props: The props of the component.
  562. Returns:
  563. The component.
  564. Raises:
  565. TypeError: If an invalid child is passed.
  566. """
  567. ...