charts.pyi 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054
  1. """Stub file for reflex/components/recharts/charts.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `reflex/utils/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
  6. from reflex.constants.colors import Color
  7. from reflex.event import EventHandler, EventSpec
  8. from reflex.style import Style
  9. from reflex.vars.base import Var
  10. from .recharts import (
  11. RechartsCharts,
  12. )
  13. class ChartBase(RechartsCharts):
  14. @overload
  15. @classmethod
  16. def create( # type: ignore
  17. cls,
  18. *children,
  19. width: Optional[Union[Var[Union[int, str]], int, str]] = None,
  20. height: Optional[Union[Var[Union[int, str]], int, str]] = None,
  21. style: Optional[Style] = None,
  22. key: Optional[Any] = None,
  23. id: Optional[Any] = None,
  24. class_name: Optional[Any] = None,
  25. autofocus: Optional[bool] = None,
  26. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  27. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  28. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  29. on_context_menu: Optional[
  30. Union[EventHandler, EventSpec, list, Callable, Var]
  31. ] = None,
  32. on_double_click: Optional[
  33. Union[EventHandler, EventSpec, list, Callable, Var]
  34. ] = None,
  35. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  36. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  37. on_mouse_down: Optional[
  38. Union[EventHandler, EventSpec, list, Callable, Var]
  39. ] = None,
  40. on_mouse_enter: Optional[
  41. Union[EventHandler, EventSpec, list, Callable, Var]
  42. ] = None,
  43. on_mouse_leave: Optional[
  44. Union[EventHandler, EventSpec, list, Callable, Var]
  45. ] = None,
  46. on_mouse_move: Optional[
  47. Union[EventHandler, EventSpec, list, Callable, Var]
  48. ] = None,
  49. on_mouse_out: Optional[
  50. Union[EventHandler, EventSpec, list, Callable, Var]
  51. ] = None,
  52. on_mouse_over: Optional[
  53. Union[EventHandler, EventSpec, list, Callable, Var]
  54. ] = None,
  55. on_mouse_up: Optional[
  56. Union[EventHandler, EventSpec, list, Callable, Var]
  57. ] = None,
  58. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  59. on_unmount: Optional[
  60. Union[EventHandler, EventSpec, list, Callable, Var]
  61. ] = None,
  62. **props,
  63. ) -> "ChartBase":
  64. """Create a chart component.
  65. Args:
  66. *children: The children of the chart component.
  67. width: The width of chart container. String or Integer
  68. height: The height of chart container.
  69. style: The style of the component.
  70. key: A unique key for the component.
  71. id: The id for the component.
  72. class_name: The class name for the component.
  73. autofocus: Whether the component should take the focus once the page is loaded
  74. custom_attrs: custom attribute
  75. **props: The properties of the chart component.
  76. Returns:
  77. The chart component wrapped in a responsive container.
  78. """
  79. ...
  80. class CategoricalChartBase(ChartBase):
  81. @overload
  82. @classmethod
  83. def create( # type: ignore
  84. cls,
  85. *children,
  86. data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
  87. margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
  88. sync_id: Optional[Union[Var[str], str]] = None,
  89. sync_method: Optional[
  90. Union[Literal["index", "value"], Var[Literal["index", "value"]]]
  91. ] = None,
  92. layout: Optional[
  93. Union[
  94. Literal["horizontal", "vertical"],
  95. Var[Literal["horizontal", "vertical"]],
  96. ]
  97. ] = None,
  98. stack_offset: Optional[
  99. Union[
  100. Literal["expand", "none", "silhouette", "wiggle"],
  101. Var[Literal["expand", "none", "silhouette", "wiggle"]],
  102. ]
  103. ] = None,
  104. width: Optional[Union[Var[Union[int, str]], int, str]] = None,
  105. height: Optional[Union[Var[Union[int, str]], int, str]] = None,
  106. style: Optional[Style] = None,
  107. key: Optional[Any] = None,
  108. id: Optional[Any] = None,
  109. class_name: Optional[Any] = None,
  110. autofocus: Optional[bool] = None,
  111. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  112. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  113. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  114. on_context_menu: Optional[
  115. Union[EventHandler, EventSpec, list, Callable, Var]
  116. ] = None,
  117. on_double_click: Optional[
  118. Union[EventHandler, EventSpec, list, Callable, Var]
  119. ] = None,
  120. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  121. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  122. on_mouse_down: Optional[
  123. Union[EventHandler, EventSpec, list, Callable, Var]
  124. ] = None,
  125. on_mouse_enter: Optional[
  126. Union[EventHandler, EventSpec, list, Callable, Var]
  127. ] = None,
  128. on_mouse_leave: Optional[
  129. Union[EventHandler, EventSpec, list, Callable, Var]
  130. ] = None,
  131. on_mouse_move: Optional[
  132. Union[EventHandler, EventSpec, list, Callable, Var]
  133. ] = None,
  134. on_mouse_out: Optional[
  135. Union[EventHandler, EventSpec, list, Callable, Var]
  136. ] = None,
  137. on_mouse_over: Optional[
  138. Union[EventHandler, EventSpec, list, Callable, Var]
  139. ] = None,
  140. on_mouse_up: Optional[
  141. Union[EventHandler, EventSpec, list, Callable, Var]
  142. ] = None,
  143. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  144. on_unmount: Optional[
  145. Union[EventHandler, EventSpec, list, Callable, Var]
  146. ] = None,
  147. **props,
  148. ) -> "CategoricalChartBase":
  149. """Create a chart component.
  150. Args:
  151. *children: The children of the chart component.
  152. data: The source data, in which each element is an object.
  153. margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
  154. sync_id: If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush.
  155. sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
  156. layout: The layout of area in the chart. 'horizontal' | 'vertical'
  157. stack_offset: The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. 'expand' | 'none' | 'wiggle' | 'silhouette'
  158. width: The width of chart container. String or Integer
  159. height: The height of chart container.
  160. style: The style of the component.
  161. key: A unique key for the component.
  162. id: The id for the component.
  163. class_name: The class name for the component.
  164. autofocus: Whether the component should take the focus once the page is loaded
  165. custom_attrs: custom attribute
  166. **props: The properties of the chart component.
  167. Returns:
  168. The chart component wrapped in a responsive container.
  169. """
  170. ...
  171. class AreaChart(CategoricalChartBase):
  172. @overload
  173. @classmethod
  174. def create( # type: ignore
  175. cls,
  176. *children,
  177. base_value: Optional[
  178. Union[
  179. Literal["auto", "dataMax", "dataMin"],
  180. Var[Union[Literal["auto", "dataMax", "dataMin"], int]],
  181. int,
  182. ]
  183. ] = None,
  184. data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
  185. margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
  186. sync_id: Optional[Union[Var[str], str]] = None,
  187. sync_method: Optional[
  188. Union[Literal["index", "value"], Var[Literal["index", "value"]]]
  189. ] = None,
  190. layout: Optional[
  191. Union[
  192. Literal["horizontal", "vertical"],
  193. Var[Literal["horizontal", "vertical"]],
  194. ]
  195. ] = None,
  196. stack_offset: Optional[
  197. Union[
  198. Literal["expand", "none", "silhouette", "wiggle"],
  199. Var[Literal["expand", "none", "silhouette", "wiggle"]],
  200. ]
  201. ] = None,
  202. width: Optional[Union[Var[Union[int, str]], int, str]] = None,
  203. height: Optional[Union[Var[Union[int, str]], int, str]] = None,
  204. style: Optional[Style] = None,
  205. key: Optional[Any] = None,
  206. id: Optional[Any] = None,
  207. class_name: Optional[Any] = None,
  208. autofocus: Optional[bool] = None,
  209. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  210. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  211. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  212. on_context_menu: Optional[
  213. Union[EventHandler, EventSpec, list, Callable, Var]
  214. ] = None,
  215. on_double_click: Optional[
  216. Union[EventHandler, EventSpec, list, Callable, Var]
  217. ] = None,
  218. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  219. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  220. on_mouse_down: Optional[
  221. Union[EventHandler, EventSpec, list, Callable, Var]
  222. ] = None,
  223. on_mouse_enter: Optional[
  224. Union[EventHandler, EventSpec, list, Callable, Var]
  225. ] = None,
  226. on_mouse_leave: Optional[
  227. Union[EventHandler, EventSpec, list, Callable, Var]
  228. ] = None,
  229. on_mouse_move: Optional[
  230. Union[EventHandler, EventSpec, list, Callable, Var]
  231. ] = None,
  232. on_mouse_out: Optional[
  233. Union[EventHandler, EventSpec, list, Callable, Var]
  234. ] = None,
  235. on_mouse_over: Optional[
  236. Union[EventHandler, EventSpec, list, Callable, Var]
  237. ] = None,
  238. on_mouse_up: Optional[
  239. Union[EventHandler, EventSpec, list, Callable, Var]
  240. ] = None,
  241. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  242. on_unmount: Optional[
  243. Union[EventHandler, EventSpec, list, Callable, Var]
  244. ] = None,
  245. **props,
  246. ) -> "AreaChart":
  247. """Create a chart component.
  248. Args:
  249. *children: The children of the chart component.
  250. base_value: The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'
  251. data: The source data, in which each element is an object.
  252. margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
  253. sync_id: If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush.
  254. sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
  255. layout: The layout of area in the chart. 'horizontal' | 'vertical'
  256. stack_offset: The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. 'expand' | 'none' | 'wiggle' | 'silhouette'
  257. width: The width of chart container. String or Integer
  258. height: The height of chart container.
  259. style: The style of the component.
  260. key: A unique key for the component.
  261. id: The id for the component.
  262. class_name: The class name for the component.
  263. autofocus: Whether the component should take the focus once the page is loaded
  264. custom_attrs: custom attribute
  265. **props: The properties of the chart component.
  266. Returns:
  267. The chart component wrapped in a responsive container.
  268. """
  269. ...
  270. class BarChart(CategoricalChartBase):
  271. @overload
  272. @classmethod
  273. def create( # type: ignore
  274. cls,
  275. *children,
  276. bar_category_gap: Optional[Union[Var[Union[int, str]], int, str]] = None,
  277. bar_gap: Optional[Union[Var[Union[int, str]], int, str]] = None,
  278. bar_size: Optional[Union[Var[int], int]] = None,
  279. max_bar_size: Optional[Union[Var[int], int]] = None,
  280. stack_offset: Optional[
  281. Union[
  282. Literal["expand", "none", "silhouette", "wiggle"],
  283. Var[Literal["expand", "none", "silhouette", "wiggle"]],
  284. ]
  285. ] = None,
  286. reverse_stack_order: Optional[Union[Var[bool], bool]] = None,
  287. data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
  288. margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
  289. sync_id: Optional[Union[Var[str], str]] = None,
  290. sync_method: Optional[
  291. Union[Literal["index", "value"], Var[Literal["index", "value"]]]
  292. ] = None,
  293. layout: Optional[
  294. Union[
  295. Literal["horizontal", "vertical"],
  296. Var[Literal["horizontal", "vertical"]],
  297. ]
  298. ] = None,
  299. width: Optional[Union[Var[Union[int, str]], int, str]] = None,
  300. height: Optional[Union[Var[Union[int, str]], int, str]] = None,
  301. style: Optional[Style] = None,
  302. key: Optional[Any] = None,
  303. id: Optional[Any] = None,
  304. class_name: Optional[Any] = None,
  305. autofocus: Optional[bool] = None,
  306. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  307. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  308. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  309. on_context_menu: Optional[
  310. Union[EventHandler, EventSpec, list, Callable, Var]
  311. ] = None,
  312. on_double_click: Optional[
  313. Union[EventHandler, EventSpec, list, Callable, Var]
  314. ] = None,
  315. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  316. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  317. on_mouse_down: Optional[
  318. Union[EventHandler, EventSpec, list, Callable, Var]
  319. ] = None,
  320. on_mouse_enter: Optional[
  321. Union[EventHandler, EventSpec, list, Callable, Var]
  322. ] = None,
  323. on_mouse_leave: Optional[
  324. Union[EventHandler, EventSpec, list, Callable, Var]
  325. ] = None,
  326. on_mouse_move: Optional[
  327. Union[EventHandler, EventSpec, list, Callable, Var]
  328. ] = None,
  329. on_mouse_out: Optional[
  330. Union[EventHandler, EventSpec, list, Callable, Var]
  331. ] = None,
  332. on_mouse_over: Optional[
  333. Union[EventHandler, EventSpec, list, Callable, Var]
  334. ] = None,
  335. on_mouse_up: Optional[
  336. Union[EventHandler, EventSpec, list, Callable, Var]
  337. ] = None,
  338. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  339. on_unmount: Optional[
  340. Union[EventHandler, EventSpec, list, Callable, Var]
  341. ] = None,
  342. **props,
  343. ) -> "BarChart":
  344. """Create a chart component.
  345. Args:
  346. *children: The children of the chart component.
  347. bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number
  348. bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
  349. bar_size: The width of all the bars in the chart. Number
  350. max_bar_size: The maximum width of all the bars in a horizontal BarChart, or maximum height in a vertical BarChart.
  351. stack_offset: The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. 'expand' | 'none' | 'wiggle' | 'silhouette'
  352. reverse_stack_order: If false set, stacked items will be rendered left to right. If true set, stacked items will be rendered right to left. (Render direction affects SVG layering, not x position.)
  353. data: The source data, in which each element is an object.
  354. margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
  355. sync_id: If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush.
  356. sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
  357. layout: The layout of area in the chart. 'horizontal' | 'vertical'
  358. width: The width of chart container. String or Integer
  359. height: The height of chart container.
  360. style: The style of the component.
  361. key: A unique key for the component.
  362. id: The id for the component.
  363. class_name: The class name for the component.
  364. autofocus: Whether the component should take the focus once the page is loaded
  365. custom_attrs: custom attribute
  366. **props: The properties of the chart component.
  367. Returns:
  368. The chart component wrapped in a responsive container.
  369. """
  370. ...
  371. class LineChart(CategoricalChartBase):
  372. @overload
  373. @classmethod
  374. def create( # type: ignore
  375. cls,
  376. *children,
  377. data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
  378. margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
  379. sync_id: Optional[Union[Var[str], str]] = None,
  380. sync_method: Optional[
  381. Union[Literal["index", "value"], Var[Literal["index", "value"]]]
  382. ] = None,
  383. layout: Optional[
  384. Union[
  385. Literal["horizontal", "vertical"],
  386. Var[Literal["horizontal", "vertical"]],
  387. ]
  388. ] = None,
  389. stack_offset: Optional[
  390. Union[
  391. Literal["expand", "none", "silhouette", "wiggle"],
  392. Var[Literal["expand", "none", "silhouette", "wiggle"]],
  393. ]
  394. ] = None,
  395. width: Optional[Union[Var[Union[int, str]], int, str]] = None,
  396. height: Optional[Union[Var[Union[int, str]], int, str]] = None,
  397. style: Optional[Style] = None,
  398. key: Optional[Any] = None,
  399. id: Optional[Any] = None,
  400. class_name: Optional[Any] = None,
  401. autofocus: Optional[bool] = None,
  402. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  403. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  404. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  405. on_context_menu: Optional[
  406. Union[EventHandler, EventSpec, list, Callable, Var]
  407. ] = None,
  408. on_double_click: Optional[
  409. Union[EventHandler, EventSpec, list, Callable, Var]
  410. ] = None,
  411. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  412. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  413. on_mouse_down: Optional[
  414. Union[EventHandler, EventSpec, list, Callable, Var]
  415. ] = None,
  416. on_mouse_enter: Optional[
  417. Union[EventHandler, EventSpec, list, Callable, Var]
  418. ] = None,
  419. on_mouse_leave: Optional[
  420. Union[EventHandler, EventSpec, list, Callable, Var]
  421. ] = None,
  422. on_mouse_move: Optional[
  423. Union[EventHandler, EventSpec, list, Callable, Var]
  424. ] = None,
  425. on_mouse_out: Optional[
  426. Union[EventHandler, EventSpec, list, Callable, Var]
  427. ] = None,
  428. on_mouse_over: Optional[
  429. Union[EventHandler, EventSpec, list, Callable, Var]
  430. ] = None,
  431. on_mouse_up: Optional[
  432. Union[EventHandler, EventSpec, list, Callable, Var]
  433. ] = None,
  434. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  435. on_unmount: Optional[
  436. Union[EventHandler, EventSpec, list, Callable, Var]
  437. ] = None,
  438. **props,
  439. ) -> "LineChart":
  440. """Create a chart component.
  441. Args:
  442. *children: The children of the chart component.
  443. data: The source data, in which each element is an object.
  444. margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
  445. sync_id: If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush.
  446. sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
  447. layout: The layout of area in the chart. 'horizontal' | 'vertical'
  448. stack_offset: The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. 'expand' | 'none' | 'wiggle' | 'silhouette'
  449. width: The width of chart container. String or Integer
  450. height: The height of chart container.
  451. style: The style of the component.
  452. key: A unique key for the component.
  453. id: The id for the component.
  454. class_name: The class name for the component.
  455. autofocus: Whether the component should take the focus once the page is loaded
  456. custom_attrs: custom attribute
  457. **props: The properties of the chart component.
  458. Returns:
  459. The chart component wrapped in a responsive container.
  460. """
  461. ...
  462. class ComposedChart(CategoricalChartBase):
  463. @overload
  464. @classmethod
  465. def create( # type: ignore
  466. cls,
  467. *children,
  468. base_value: Optional[
  469. Union[
  470. Literal["auto", "dataMax", "dataMin"],
  471. Var[Union[Literal["auto", "dataMax", "dataMin"], int]],
  472. int,
  473. ]
  474. ] = None,
  475. bar_category_gap: Optional[Union[Var[Union[int, str]], int, str]] = None,
  476. bar_gap: Optional[Union[Var[Union[int, str]], int, str]] = None,
  477. bar_size: Optional[Union[Var[int], int]] = None,
  478. reverse_stack_order: Optional[Union[Var[bool], bool]] = None,
  479. data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
  480. margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
  481. sync_id: Optional[Union[Var[str], str]] = None,
  482. sync_method: Optional[
  483. Union[Literal["index", "value"], Var[Literal["index", "value"]]]
  484. ] = None,
  485. layout: Optional[
  486. Union[
  487. Literal["horizontal", "vertical"],
  488. Var[Literal["horizontal", "vertical"]],
  489. ]
  490. ] = None,
  491. stack_offset: Optional[
  492. Union[
  493. Literal["expand", "none", "silhouette", "wiggle"],
  494. Var[Literal["expand", "none", "silhouette", "wiggle"]],
  495. ]
  496. ] = None,
  497. width: Optional[Union[Var[Union[int, str]], int, str]] = None,
  498. height: Optional[Union[Var[Union[int, str]], int, str]] = None,
  499. style: Optional[Style] = None,
  500. key: Optional[Any] = None,
  501. id: Optional[Any] = None,
  502. class_name: Optional[Any] = None,
  503. autofocus: Optional[bool] = None,
  504. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  505. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  506. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  507. on_context_menu: Optional[
  508. Union[EventHandler, EventSpec, list, Callable, Var]
  509. ] = None,
  510. on_double_click: Optional[
  511. Union[EventHandler, EventSpec, list, Callable, Var]
  512. ] = None,
  513. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  514. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  515. on_mouse_down: Optional[
  516. Union[EventHandler, EventSpec, list, Callable, Var]
  517. ] = None,
  518. on_mouse_enter: Optional[
  519. Union[EventHandler, EventSpec, list, Callable, Var]
  520. ] = None,
  521. on_mouse_leave: Optional[
  522. Union[EventHandler, EventSpec, list, Callable, Var]
  523. ] = None,
  524. on_mouse_move: Optional[
  525. Union[EventHandler, EventSpec, list, Callable, Var]
  526. ] = None,
  527. on_mouse_out: Optional[
  528. Union[EventHandler, EventSpec, list, Callable, Var]
  529. ] = None,
  530. on_mouse_over: Optional[
  531. Union[EventHandler, EventSpec, list, Callable, Var]
  532. ] = None,
  533. on_mouse_up: Optional[
  534. Union[EventHandler, EventSpec, list, Callable, Var]
  535. ] = None,
  536. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  537. on_unmount: Optional[
  538. Union[EventHandler, EventSpec, list, Callable, Var]
  539. ] = None,
  540. **props,
  541. ) -> "ComposedChart":
  542. """Create a chart component.
  543. Args:
  544. *children: The children of the chart component.
  545. base_value: The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'
  546. bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number
  547. bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
  548. bar_size: The width of all the bars in the chart. Number
  549. reverse_stack_order: If false set, stacked items will be rendered left to right. If true set, stacked items will be rendered right to left. (Render direction affects SVG layering, not x position.)
  550. data: The source data, in which each element is an object.
  551. margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
  552. sync_id: If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush.
  553. sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
  554. layout: The layout of area in the chart. 'horizontal' | 'vertical'
  555. stack_offset: The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. 'expand' | 'none' | 'wiggle' | 'silhouette'
  556. width: The width of chart container. String or Integer
  557. height: The height of chart container.
  558. style: The style of the component.
  559. key: A unique key for the component.
  560. id: The id for the component.
  561. class_name: The class name for the component.
  562. autofocus: Whether the component should take the focus once the page is loaded
  563. custom_attrs: custom attribute
  564. **props: The properties of the chart component.
  565. Returns:
  566. The chart component wrapped in a responsive container.
  567. """
  568. ...
  569. class PieChart(ChartBase):
  570. @overload
  571. @classmethod
  572. def create( # type: ignore
  573. cls,
  574. *children,
  575. margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
  576. width: Optional[Union[Var[Union[int, str]], int, str]] = None,
  577. height: Optional[Union[Var[Union[int, str]], int, str]] = None,
  578. style: Optional[Style] = None,
  579. key: Optional[Any] = None,
  580. id: Optional[Any] = None,
  581. class_name: Optional[Any] = None,
  582. autofocus: Optional[bool] = None,
  583. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  584. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  585. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  586. on_context_menu: Optional[
  587. Union[EventHandler, EventSpec, list, Callable, Var]
  588. ] = None,
  589. on_double_click: Optional[
  590. Union[EventHandler, EventSpec, list, Callable, Var]
  591. ] = None,
  592. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  593. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  594. on_mouse_down: Optional[
  595. Union[EventHandler, EventSpec, list, Callable, Var]
  596. ] = None,
  597. on_mouse_enter: Optional[
  598. Union[EventHandler, EventSpec, list, Callable, Var]
  599. ] = None,
  600. on_mouse_leave: Optional[
  601. Union[EventHandler, EventSpec, list, Callable, Var]
  602. ] = None,
  603. on_mouse_move: Optional[
  604. Union[EventHandler, EventSpec, list, Callable, Var]
  605. ] = None,
  606. on_mouse_out: Optional[
  607. Union[EventHandler, EventSpec, list, Callable, Var]
  608. ] = None,
  609. on_mouse_over: Optional[
  610. Union[EventHandler, EventSpec, list, Callable, Var]
  611. ] = None,
  612. on_mouse_up: Optional[
  613. Union[EventHandler, EventSpec, list, Callable, Var]
  614. ] = None,
  615. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  616. on_unmount: Optional[
  617. Union[EventHandler, EventSpec, list, Callable, Var]
  618. ] = None,
  619. **props,
  620. ) -> "PieChart":
  621. """Create a chart component.
  622. Args:
  623. *children: The children of the chart component.
  624. margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
  625. width: The width of chart container. String or Integer
  626. height: The height of chart container.
  627. style: The style of the component.
  628. key: A unique key for the component.
  629. id: The id for the component.
  630. class_name: The class name for the component.
  631. autofocus: Whether the component should take the focus once the page is loaded
  632. custom_attrs: custom attribute
  633. **props: The properties of the chart component.
  634. Returns:
  635. The chart component wrapped in a responsive container.
  636. """
  637. ...
  638. class RadarChart(ChartBase):
  639. def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
  640. @overload
  641. @classmethod
  642. def create( # type: ignore
  643. cls,
  644. *children,
  645. data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
  646. margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
  647. cx: Optional[Union[Var[Union[int, str]], int, str]] = None,
  648. cy: Optional[Union[Var[Union[int, str]], int, str]] = None,
  649. start_angle: Optional[Union[Var[int], int]] = None,
  650. end_angle: Optional[Union[Var[int], int]] = None,
  651. inner_radius: Optional[Union[Var[Union[int, str]], int, str]] = None,
  652. outer_radius: Optional[Union[Var[Union[int, str]], int, str]] = None,
  653. width: Optional[Union[Var[Union[int, str]], int, str]] = None,
  654. height: Optional[Union[Var[Union[int, str]], int, str]] = None,
  655. style: Optional[Style] = None,
  656. key: Optional[Any] = None,
  657. id: Optional[Any] = None,
  658. class_name: Optional[Any] = None,
  659. autofocus: Optional[bool] = None,
  660. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  661. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  662. on_mouse_enter: Optional[
  663. Union[EventHandler, EventSpec, list, Callable, Var]
  664. ] = None,
  665. on_mouse_leave: Optional[
  666. Union[EventHandler, EventSpec, list, Callable, Var]
  667. ] = None,
  668. **props,
  669. ) -> "RadarChart":
  670. """Create a chart component.
  671. Args:
  672. *children: The children of the chart component.
  673. data: The source data, in which each element is an object.
  674. margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
  675. cx: The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage
  676. cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage
  677. start_angle: The angle of first radial direction line.
  678. end_angle: The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'.
  679. inner_radius: The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
  680. outer_radius: The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
  681. width: The width of chart container. String or Integer
  682. height: The height of chart container.
  683. style: The style of the component.
  684. key: A unique key for the component.
  685. id: The id for the component.
  686. class_name: The class name for the component.
  687. autofocus: Whether the component should take the focus once the page is loaded
  688. custom_attrs: custom attribute
  689. **props: The properties of the chart component.
  690. Returns:
  691. The chart component wrapped in a responsive container.
  692. """
  693. ...
  694. class RadialBarChart(ChartBase):
  695. @overload
  696. @classmethod
  697. def create( # type: ignore
  698. cls,
  699. *children,
  700. data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
  701. margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
  702. cx: Optional[Union[Var[Union[int, str]], int, str]] = None,
  703. cy: Optional[Union[Var[Union[int, str]], int, str]] = None,
  704. start_angle: Optional[Union[Var[int], int]] = None,
  705. end_angle: Optional[Union[Var[int], int]] = None,
  706. inner_radius: Optional[Union[Var[Union[int, str]], int, str]] = None,
  707. outer_radius: Optional[Union[Var[Union[int, str]], int, str]] = None,
  708. bar_category_gap: Optional[Union[Var[Union[int, str]], int, str]] = None,
  709. bar_gap: Optional[Union[Var[str], str]] = None,
  710. bar_size: Optional[Union[Var[int], int]] = None,
  711. width: Optional[Union[Var[Union[int, str]], int, str]] = None,
  712. height: Optional[Union[Var[Union[int, str]], int, str]] = None,
  713. style: Optional[Style] = None,
  714. key: Optional[Any] = None,
  715. id: Optional[Any] = None,
  716. class_name: Optional[Any] = None,
  717. autofocus: Optional[bool] = None,
  718. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  719. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  720. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  721. on_context_menu: Optional[
  722. Union[EventHandler, EventSpec, list, Callable, Var]
  723. ] = None,
  724. on_double_click: Optional[
  725. Union[EventHandler, EventSpec, list, Callable, Var]
  726. ] = None,
  727. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  728. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  729. on_mouse_down: Optional[
  730. Union[EventHandler, EventSpec, list, Callable, Var]
  731. ] = None,
  732. on_mouse_enter: Optional[
  733. Union[EventHandler, EventSpec, list, Callable, Var]
  734. ] = None,
  735. on_mouse_leave: Optional[
  736. Union[EventHandler, EventSpec, list, Callable, Var]
  737. ] = None,
  738. on_mouse_move: Optional[
  739. Union[EventHandler, EventSpec, list, Callable, Var]
  740. ] = None,
  741. on_mouse_out: Optional[
  742. Union[EventHandler, EventSpec, list, Callable, Var]
  743. ] = None,
  744. on_mouse_over: Optional[
  745. Union[EventHandler, EventSpec, list, Callable, Var]
  746. ] = None,
  747. on_mouse_up: Optional[
  748. Union[EventHandler, EventSpec, list, Callable, Var]
  749. ] = None,
  750. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  751. on_unmount: Optional[
  752. Union[EventHandler, EventSpec, list, Callable, Var]
  753. ] = None,
  754. **props,
  755. ) -> "RadialBarChart":
  756. """Create a chart component.
  757. Args:
  758. *children: The children of the chart component.
  759. data: The source data which each element is an object.
  760. margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
  761. cx: The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage
  762. cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage
  763. start_angle: The angle of first radial direction line.
  764. end_angle: The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'.
  765. inner_radius: The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
  766. outer_radius: The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
  767. bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number
  768. bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
  769. bar_size: The size of each bar. If the barSize is not specified, the size of bar will be calculated by the barCategoryGap, barGap and the quantity of bar groups.
  770. width: The width of chart container. String or Integer
  771. height: The height of chart container.
  772. style: The style of the component.
  773. key: A unique key for the component.
  774. id: The id for the component.
  775. class_name: The class name for the component.
  776. autofocus: Whether the component should take the focus once the page is loaded
  777. custom_attrs: custom attribute
  778. **props: The properties of the chart component.
  779. Returns:
  780. The chart component wrapped in a responsive container.
  781. """
  782. ...
  783. class ScatterChart(ChartBase):
  784. def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
  785. @overload
  786. @classmethod
  787. def create( # type: ignore
  788. cls,
  789. *children,
  790. margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
  791. width: Optional[Union[Var[Union[int, str]], int, str]] = None,
  792. height: Optional[Union[Var[Union[int, str]], int, str]] = None,
  793. style: Optional[Style] = None,
  794. key: Optional[Any] = None,
  795. id: Optional[Any] = None,
  796. class_name: Optional[Any] = None,
  797. autofocus: Optional[bool] = None,
  798. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  799. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  800. on_mouse_down: Optional[
  801. Union[EventHandler, EventSpec, list, Callable, Var]
  802. ] = None,
  803. on_mouse_enter: Optional[
  804. Union[EventHandler, EventSpec, list, Callable, Var]
  805. ] = None,
  806. on_mouse_leave: Optional[
  807. Union[EventHandler, EventSpec, list, Callable, Var]
  808. ] = None,
  809. on_mouse_move: Optional[
  810. Union[EventHandler, EventSpec, list, Callable, Var]
  811. ] = None,
  812. on_mouse_out: Optional[
  813. Union[EventHandler, EventSpec, list, Callable, Var]
  814. ] = None,
  815. on_mouse_over: Optional[
  816. Union[EventHandler, EventSpec, list, Callable, Var]
  817. ] = None,
  818. on_mouse_up: Optional[
  819. Union[EventHandler, EventSpec, list, Callable, Var]
  820. ] = None,
  821. **props,
  822. ) -> "ScatterChart":
  823. """Create a chart component.
  824. Args:
  825. *children: The children of the chart component.
  826. margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
  827. width: The width of chart container. String or Integer
  828. height: The height of chart container.
  829. style: The style of the component.
  830. key: A unique key for the component.
  831. id: The id for the component.
  832. class_name: The class name for the component.
  833. autofocus: Whether the component should take the focus once the page is loaded
  834. custom_attrs: custom attribute
  835. **props: The properties of the chart component.
  836. Returns:
  837. The chart component wrapped in a responsive container.
  838. """
  839. ...
  840. class FunnelChart(ChartBase):
  841. @overload
  842. @classmethod
  843. def create( # type: ignore
  844. cls,
  845. *children,
  846. layout: Optional[Union[Var[str], str]] = None,
  847. margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
  848. stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
  849. width: Optional[Union[Var[Union[int, str]], int, str]] = None,
  850. height: Optional[Union[Var[Union[int, str]], int, str]] = None,
  851. style: Optional[Style] = None,
  852. key: Optional[Any] = None,
  853. id: Optional[Any] = None,
  854. class_name: Optional[Any] = None,
  855. autofocus: Optional[bool] = None,
  856. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  857. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  858. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  859. on_context_menu: Optional[
  860. Union[EventHandler, EventSpec, list, Callable, Var]
  861. ] = None,
  862. on_double_click: Optional[
  863. Union[EventHandler, EventSpec, list, Callable, Var]
  864. ] = None,
  865. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  866. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  867. on_mouse_down: Optional[
  868. Union[EventHandler, EventSpec, list, Callable, Var]
  869. ] = None,
  870. on_mouse_enter: Optional[
  871. Union[EventHandler, EventSpec, list, Callable, Var]
  872. ] = None,
  873. on_mouse_leave: Optional[
  874. Union[EventHandler, EventSpec, list, Callable, Var]
  875. ] = None,
  876. on_mouse_move: Optional[
  877. Union[EventHandler, EventSpec, list, Callable, Var]
  878. ] = None,
  879. on_mouse_out: Optional[
  880. Union[EventHandler, EventSpec, list, Callable, Var]
  881. ] = None,
  882. on_mouse_over: Optional[
  883. Union[EventHandler, EventSpec, list, Callable, Var]
  884. ] = None,
  885. on_mouse_up: Optional[
  886. Union[EventHandler, EventSpec, list, Callable, Var]
  887. ] = None,
  888. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  889. on_unmount: Optional[
  890. Union[EventHandler, EventSpec, list, Callable, Var]
  891. ] = None,
  892. **props,
  893. ) -> "FunnelChart":
  894. """Create a chart component.
  895. Args:
  896. *children: The children of the chart component.
  897. layout: The layout of bars in the chart. centeric
  898. margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
  899. stroke: The stroke color of each bar. String | Object
  900. width: The width of chart container. String or Integer
  901. height: The height of chart container.
  902. style: The style of the component.
  903. key: A unique key for the component.
  904. id: The id for the component.
  905. class_name: The class name for the component.
  906. autofocus: Whether the component should take the focus once the page is loaded
  907. custom_attrs: custom attribute
  908. **props: The properties of the chart component.
  909. Returns:
  910. The chart component wrapped in a responsive container.
  911. """
  912. ...
  913. class Treemap(RechartsCharts):
  914. @overload
  915. @classmethod
  916. def create( # type: ignore
  917. cls,
  918. *children,
  919. width: Optional[Union[Var[Union[int, str]], int, str]] = None,
  920. height: Optional[Union[Var[Union[int, str]], int, str]] = None,
  921. data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
  922. data_key: Optional[Union[Var[Union[int, str]], int, str]] = None,
  923. aspect_ratio: Optional[Union[Var[int], int]] = None,
  924. is_animation_active: Optional[Union[Var[bool], bool]] = None,
  925. animation_begin: Optional[Union[Var[int], int]] = None,
  926. animation_duration: Optional[Union[Var[int], int]] = None,
  927. animation_easing: Optional[
  928. Union[
  929. Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"],
  930. Var[Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"]],
  931. ]
  932. ] = None,
  933. style: Optional[Style] = None,
  934. key: Optional[Any] = None,
  935. id: Optional[Any] = None,
  936. class_name: Optional[Any] = None,
  937. autofocus: Optional[bool] = None,
  938. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  939. on_animation_end: Optional[
  940. Union[EventHandler, EventSpec, list, Callable, Var]
  941. ] = None,
  942. on_animation_start: Optional[
  943. Union[EventHandler, EventSpec, list, Callable, Var]
  944. ] = None,
  945. on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  946. on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  947. on_context_menu: Optional[
  948. Union[EventHandler, EventSpec, list, Callable, Var]
  949. ] = None,
  950. on_double_click: Optional[
  951. Union[EventHandler, EventSpec, list, Callable, Var]
  952. ] = None,
  953. on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  954. on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  955. on_mouse_down: Optional[
  956. Union[EventHandler, EventSpec, list, Callable, Var]
  957. ] = None,
  958. on_mouse_enter: Optional[
  959. Union[EventHandler, EventSpec, list, Callable, Var]
  960. ] = None,
  961. on_mouse_leave: Optional[
  962. Union[EventHandler, EventSpec, list, Callable, Var]
  963. ] = None,
  964. on_mouse_move: Optional[
  965. Union[EventHandler, EventSpec, list, Callable, Var]
  966. ] = None,
  967. on_mouse_out: Optional[
  968. Union[EventHandler, EventSpec, list, Callable, Var]
  969. ] = None,
  970. on_mouse_over: Optional[
  971. Union[EventHandler, EventSpec, list, Callable, Var]
  972. ] = None,
  973. on_mouse_up: Optional[
  974. Union[EventHandler, EventSpec, list, Callable, Var]
  975. ] = None,
  976. on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
  977. on_unmount: Optional[
  978. Union[EventHandler, EventSpec, list, Callable, Var]
  979. ] = None,
  980. **props,
  981. ) -> "Treemap":
  982. """Create a chart component.
  983. Args:
  984. *children: The children of the chart component.
  985. width: The width of chart container. String or Integer
  986. height: The height of chart container.
  987. data: data of treemap. Array
  988. data_key: The key of a group of data which should be unique in a treemap. String | Number | Function
  989. aspect_ratio: The treemap will try to keep every single rectangle's aspect ratio near the aspectRatio given. Number
  990. is_animation_active: If set false, animation of area will be disabled.
  991. animation_begin: Specifies when the animation should begin, the unit of this option is ms.
  992. animation_duration: Specifies the duration of animation, the unit of this option is ms.
  993. animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'
  994. style: The style of the component.
  995. key: A unique key for the component.
  996. id: The id for the component.
  997. class_name: The class name for the component.
  998. autofocus: Whether the component should take the focus once the page is loaded
  999. custom_attrs: custom attribute
  1000. **props: The properties of the chart component.
  1001. Returns:
  1002. The Treemap component wrapped in a responsive container.
  1003. """
  1004. ...
  1005. area_chart = AreaChart.create
  1006. bar_chart = BarChart.create
  1007. line_chart = LineChart.create
  1008. composed_chart = ComposedChart.create
  1009. pie_chart = PieChart.create
  1010. radar_chart = RadarChart.create
  1011. radial_bar_chart = RadialBarChart.create
  1012. scatter_chart = ScatterChart.create
  1013. funnel_chart = FunnelChart.create
  1014. treemap = Treemap.create