general.pyi 24 KB

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