charts.pyi 53 KB

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