1
0

charts.pyi 53 KB

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