charts.pyi 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895
  1. """Stub file for reflex/components/recharts/charts.py"""
  2. # ------------------- DO NOT EDIT ----------------------
  3. # This file was generated by `scripts/pyi_generator.py`!
  4. # ------------------------------------------------------
  5. from typing import Any, Dict, Literal, Optional, Union, overload
  6. from reflex.vars import Var, BaseVar, ComputedVar
  7. from reflex.event import EventChain, EventHandler, EventSpec
  8. from reflex.style import Style
  9. from typing import Any, Dict, List, Union
  10. from reflex.components.component import Component
  11. from reflex.components.recharts.general import ResponsiveContainer
  12. from reflex.constants import EventTriggers
  13. from reflex.vars import Var
  14. from .recharts import (
  15. LiteralAnimationEasing,
  16. LiteralComposedChartBaseValue,
  17. LiteralLayout,
  18. LiteralStackOffset,
  19. LiteralSyncMethod,
  20. RechartsCharts,
  21. )
  22. class ChartBase(RechartsCharts):
  23. def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
  24. @overload
  25. @classmethod
  26. def create( # type: ignore
  27. cls,
  28. *children,
  29. data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
  30. sync_id: Optional[Union[Var[str], str]] = None,
  31. sync_method: Optional[
  32. Union[Var[Literal["index", "value"]], Literal["index", "value"]]
  33. ] = None,
  34. width: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  35. height: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  36. layout: Optional[
  37. Union[
  38. Var[Literal["horizontal", "vertical"]],
  39. Literal["horizontal", "vertical"],
  40. ]
  41. ] = None,
  42. margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
  43. stack_offset: Optional[
  44. Union[
  45. Var[Literal["expand", "none", "wiggle", "silhouette"]],
  46. Literal["expand", "none", "wiggle", "silhouette"],
  47. ]
  48. ] = None,
  49. style: Optional[Style] = None,
  50. key: Optional[Any] = None,
  51. id: Optional[Any] = None,
  52. class_name: Optional[Any] = None,
  53. autofocus: Optional[bool] = None,
  54. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  55. on_click: Optional[
  56. Union[EventHandler, EventSpec, list, function, BaseVar]
  57. ] = None,
  58. on_mouse_enter: Optional[
  59. Union[EventHandler, EventSpec, list, function, BaseVar]
  60. ] = None,
  61. on_mouse_leave: Optional[
  62. Union[EventHandler, EventSpec, list, function, BaseVar]
  63. ] = None,
  64. on_mouse_move: Optional[
  65. Union[EventHandler, EventSpec, list, function, BaseVar]
  66. ] = None,
  67. **props
  68. ) -> "ChartBase":
  69. """Create a chart component.
  70. Args:
  71. *children: The children of the chart component.
  72. data: The source data, in which each element is an object.
  73. 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.
  74. 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
  75. width: The width of chart container. String or Integer
  76. height: The height of chart container.
  77. layout: The layout of area in the chart. 'horizontal' | 'vertical'
  78. margin: The sizes of whitespace around the chart.
  79. 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'
  80. style: The style of the component.
  81. key: A unique key for the component.
  82. id: The id for the component.
  83. class_name: The class name for the component.
  84. autofocus: Whether the component should take the focus once the page is loaded
  85. custom_attrs: custom attribute
  86. **props: The properties of the chart component.
  87. Returns:
  88. The chart component wrapped in a responsive container.
  89. """
  90. ...
  91. class AreaChart(ChartBase):
  92. @overload
  93. @classmethod
  94. def create( # type: ignore
  95. cls,
  96. *children,
  97. base_value: Optional[
  98. Union[
  99. Var[Union[int, Literal["dataMin", "dataMax", "auto"]]],
  100. Union[int, Literal["dataMin", "dataMax", "auto"]],
  101. ]
  102. ] = None,
  103. stack_offset: Optional[
  104. Union[
  105. Var[Literal["expand", "none", "wiggle", "silhouette"]],
  106. Literal["expand", "none", "wiggle", "silhouette"],
  107. ]
  108. ] = None,
  109. data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
  110. sync_id: Optional[Union[Var[str], str]] = None,
  111. sync_method: Optional[
  112. Union[Var[Literal["index", "value"]], Literal["index", "value"]]
  113. ] = None,
  114. width: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  115. height: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  116. layout: Optional[
  117. Union[
  118. Var[Literal["horizontal", "vertical"]],
  119. Literal["horizontal", "vertical"],
  120. ]
  121. ] = None,
  122. margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
  123. style: Optional[Style] = None,
  124. key: Optional[Any] = None,
  125. id: Optional[Any] = None,
  126. class_name: Optional[Any] = None,
  127. autofocus: Optional[bool] = None,
  128. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  129. on_click: Optional[
  130. Union[EventHandler, EventSpec, list, function, BaseVar]
  131. ] = None,
  132. on_mouse_enter: Optional[
  133. Union[EventHandler, EventSpec, list, function, BaseVar]
  134. ] = None,
  135. on_mouse_leave: Optional[
  136. Union[EventHandler, EventSpec, list, function, BaseVar]
  137. ] = None,
  138. on_mouse_move: Optional[
  139. Union[EventHandler, EventSpec, list, function, BaseVar]
  140. ] = None,
  141. **props
  142. ) -> "AreaChart":
  143. """Create a chart component.
  144. Args:
  145. *children: The children of the chart component.
  146. base_value: The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'
  147. 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'
  148. data: The source data, in which each element is an object.
  149. 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.
  150. 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
  151. width: The width of chart container. String or Integer
  152. height: The height of chart container.
  153. layout: The layout of area in the chart. 'horizontal' | 'vertical'
  154. margin: The sizes of whitespace around the chart.
  155. style: The style of the component.
  156. key: A unique key for the component.
  157. id: The id for the component.
  158. class_name: The class name for the component.
  159. autofocus: Whether the component should take the focus once the page is loaded
  160. custom_attrs: custom attribute
  161. **props: The properties of the chart component.
  162. Returns:
  163. The chart component wrapped in a responsive container.
  164. """
  165. ...
  166. class BarChart(ChartBase):
  167. @overload
  168. @classmethod
  169. def create( # type: ignore
  170. cls,
  171. *children,
  172. bar_category_gap: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  173. bar_gap: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  174. bar_size: Optional[Union[Var[int], int]] = None,
  175. max_bar_size: Optional[Union[Var[int], int]] = None,
  176. stack_offset: Optional[
  177. Union[
  178. Var[Literal["expand", "none", "wiggle", "silhouette"]],
  179. Literal["expand", "none", "wiggle", "silhouette"],
  180. ]
  181. ] = None,
  182. reverse_stack_order: Optional[Union[Var[bool], bool]] = None,
  183. data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
  184. sync_id: Optional[Union[Var[str], str]] = None,
  185. sync_method: Optional[
  186. Union[Var[Literal["index", "value"]], Literal["index", "value"]]
  187. ] = None,
  188. width: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  189. height: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  190. layout: Optional[
  191. Union[
  192. Var[Literal["horizontal", "vertical"]],
  193. Literal["horizontal", "vertical"],
  194. ]
  195. ] = None,
  196. margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
  197. style: Optional[Style] = None,
  198. key: Optional[Any] = None,
  199. id: Optional[Any] = None,
  200. class_name: Optional[Any] = None,
  201. autofocus: Optional[bool] = None,
  202. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  203. on_click: Optional[
  204. Union[EventHandler, EventSpec, list, function, BaseVar]
  205. ] = None,
  206. on_mouse_enter: Optional[
  207. Union[EventHandler, EventSpec, list, function, BaseVar]
  208. ] = None,
  209. on_mouse_leave: Optional[
  210. Union[EventHandler, EventSpec, list, function, BaseVar]
  211. ] = None,
  212. on_mouse_move: Optional[
  213. Union[EventHandler, EventSpec, list, function, BaseVar]
  214. ] = None,
  215. **props
  216. ) -> "BarChart":
  217. """Create a chart component.
  218. Args:
  219. *children: The children of the chart component.
  220. bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number
  221. bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
  222. bar_size: The width of all the bars in the chart. Number
  223. max_bar_size: The maximum width of all the bars in a horizontal BarChart, or maximum height in a vertical BarChart.
  224. 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'
  225. 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.)
  226. data: The source data, in which each element is an object.
  227. 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.
  228. 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
  229. width: The width of chart container. String or Integer
  230. height: The height of chart container.
  231. layout: The layout of area in the chart. 'horizontal' | 'vertical'
  232. margin: The sizes of whitespace around the chart.
  233. style: The style of the component.
  234. key: A unique key for the component.
  235. id: The id for the component.
  236. class_name: The class name for the component.
  237. autofocus: Whether the component should take the focus once the page is loaded
  238. custom_attrs: custom attribute
  239. **props: The properties of the chart component.
  240. Returns:
  241. The chart component wrapped in a responsive container.
  242. """
  243. ...
  244. class LineChart(ChartBase):
  245. @overload
  246. @classmethod
  247. def create( # type: ignore
  248. cls,
  249. *children,
  250. data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
  251. sync_id: Optional[Union[Var[str], str]] = None,
  252. sync_method: Optional[
  253. Union[Var[Literal["index", "value"]], Literal["index", "value"]]
  254. ] = None,
  255. width: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  256. height: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  257. layout: Optional[
  258. Union[
  259. Var[Literal["horizontal", "vertical"]],
  260. Literal["horizontal", "vertical"],
  261. ]
  262. ] = None,
  263. margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
  264. stack_offset: Optional[
  265. Union[
  266. Var[Literal["expand", "none", "wiggle", "silhouette"]],
  267. Literal["expand", "none", "wiggle", "silhouette"],
  268. ]
  269. ] = None,
  270. style: Optional[Style] = None,
  271. key: Optional[Any] = None,
  272. id: Optional[Any] = None,
  273. class_name: Optional[Any] = None,
  274. autofocus: Optional[bool] = None,
  275. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  276. on_click: Optional[
  277. Union[EventHandler, EventSpec, list, function, BaseVar]
  278. ] = None,
  279. on_mouse_enter: Optional[
  280. Union[EventHandler, EventSpec, list, function, BaseVar]
  281. ] = None,
  282. on_mouse_leave: Optional[
  283. Union[EventHandler, EventSpec, list, function, BaseVar]
  284. ] = None,
  285. on_mouse_move: Optional[
  286. Union[EventHandler, EventSpec, list, function, BaseVar]
  287. ] = None,
  288. **props
  289. ) -> "LineChart":
  290. """Create a chart component.
  291. Args:
  292. *children: The children of the chart component.
  293. data: The source data, in which each element is an object.
  294. 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.
  295. 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
  296. width: The width of chart container. String or Integer
  297. height: The height of chart container.
  298. layout: The layout of area in the chart. 'horizontal' | 'vertical'
  299. margin: The sizes of whitespace around the chart.
  300. 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'
  301. style: The style of the component.
  302. key: A unique key for the component.
  303. id: The id for the component.
  304. class_name: The class name for the component.
  305. autofocus: Whether the component should take the focus once the page is loaded
  306. custom_attrs: custom attribute
  307. **props: The properties of the chart component.
  308. Returns:
  309. The chart component wrapped in a responsive container.
  310. """
  311. ...
  312. class ComposedChart(ChartBase):
  313. @overload
  314. @classmethod
  315. def create( # type: ignore
  316. cls,
  317. *children,
  318. base_value: Optional[
  319. Union[
  320. Var[Union[int, Literal["dataMin", "dataMax", "auto"]]],
  321. Union[int, Literal["dataMin", "dataMax", "auto"]],
  322. ]
  323. ] = None,
  324. bar_category_gap: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  325. bar_gap: Optional[Union[Var[int], int]] = None,
  326. bar_size: Optional[Union[Var[int], int]] = None,
  327. reverse_stack_order: Optional[Union[Var[bool], bool]] = None,
  328. data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
  329. sync_id: Optional[Union[Var[str], str]] = None,
  330. sync_method: Optional[
  331. Union[Var[Literal["index", "value"]], Literal["index", "value"]]
  332. ] = None,
  333. width: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  334. height: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  335. layout: Optional[
  336. Union[
  337. Var[Literal["horizontal", "vertical"]],
  338. Literal["horizontal", "vertical"],
  339. ]
  340. ] = None,
  341. margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
  342. stack_offset: Optional[
  343. Union[
  344. Var[Literal["expand", "none", "wiggle", "silhouette"]],
  345. Literal["expand", "none", "wiggle", "silhouette"],
  346. ]
  347. ] = None,
  348. style: Optional[Style] = None,
  349. key: Optional[Any] = None,
  350. id: Optional[Any] = None,
  351. class_name: Optional[Any] = None,
  352. autofocus: Optional[bool] = None,
  353. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  354. on_click: Optional[
  355. Union[EventHandler, EventSpec, list, function, BaseVar]
  356. ] = None,
  357. on_mouse_enter: Optional[
  358. Union[EventHandler, EventSpec, list, function, BaseVar]
  359. ] = None,
  360. on_mouse_leave: Optional[
  361. Union[EventHandler, EventSpec, list, function, BaseVar]
  362. ] = None,
  363. on_mouse_move: Optional[
  364. Union[EventHandler, EventSpec, list, function, BaseVar]
  365. ] = None,
  366. **props
  367. ) -> "ComposedChart":
  368. """Create a chart component.
  369. Args:
  370. *children: The children of the chart component.
  371. base_value: The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'
  372. bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number
  373. bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
  374. bar_size: The width of all the bars in the chart. Number
  375. 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.)
  376. data: The source data, in which each element is an object.
  377. 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.
  378. 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
  379. width: The width of chart container. String or Integer
  380. height: The height of chart container.
  381. layout: The layout of area in the chart. 'horizontal' | 'vertical'
  382. margin: The sizes of whitespace around the chart.
  383. 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'
  384. style: The style of the component.
  385. key: A unique key for the component.
  386. id: The id for the component.
  387. class_name: The class name for the component.
  388. autofocus: Whether the component should take the focus once the page is loaded
  389. custom_attrs: custom attribute
  390. **props: The properties of the chart component.
  391. Returns:
  392. The chart component wrapped in a responsive container.
  393. """
  394. ...
  395. class PieChart(ChartBase):
  396. def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
  397. @overload
  398. @classmethod
  399. def create( # type: ignore
  400. cls,
  401. *children,
  402. data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
  403. sync_id: Optional[Union[Var[str], str]] = None,
  404. sync_method: Optional[
  405. Union[Var[Literal["index", "value"]], Literal["index", "value"]]
  406. ] = None,
  407. width: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  408. height: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  409. layout: Optional[
  410. Union[
  411. Var[Literal["horizontal", "vertical"]],
  412. Literal["horizontal", "vertical"],
  413. ]
  414. ] = None,
  415. margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
  416. stack_offset: Optional[
  417. Union[
  418. Var[Literal["expand", "none", "wiggle", "silhouette"]],
  419. Literal["expand", "none", "wiggle", "silhouette"],
  420. ]
  421. ] = None,
  422. style: Optional[Style] = None,
  423. key: Optional[Any] = None,
  424. id: Optional[Any] = None,
  425. class_name: Optional[Any] = None,
  426. autofocus: Optional[bool] = None,
  427. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  428. on_click: Optional[
  429. Union[EventHandler, EventSpec, list, function, BaseVar]
  430. ] = None,
  431. on_mouse_enter: Optional[
  432. Union[EventHandler, EventSpec, list, function, BaseVar]
  433. ] = None,
  434. on_mouse_leave: Optional[
  435. Union[EventHandler, EventSpec, list, function, BaseVar]
  436. ] = None,
  437. **props
  438. ) -> "PieChart":
  439. """Create a chart component.
  440. Args:
  441. *children: The children of the chart component.
  442. data: The source data, in which each element is an object.
  443. 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.
  444. 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
  445. width: The width of chart container. String or Integer
  446. height: The height of chart container.
  447. layout: The layout of area in the chart. 'horizontal' | 'vertical'
  448. margin: The sizes of whitespace around the chart.
  449. 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'
  450. style: The style of the component.
  451. key: A unique key for the component.
  452. id: The id for the component.
  453. class_name: The class name for the component.
  454. autofocus: Whether the component should take the focus once the page is loaded
  455. custom_attrs: custom attribute
  456. **props: The properties of the chart component.
  457. Returns:
  458. The chart component wrapped in a responsive container.
  459. """
  460. ...
  461. class RadarChart(ChartBase):
  462. def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
  463. @overload
  464. @classmethod
  465. def create( # type: ignore
  466. cls,
  467. *children,
  468. cx: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
  469. cy: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
  470. start_angle: Optional[Union[Var[int], int]] = None,
  471. end_angle: Optional[Union[Var[int], int]] = None,
  472. inner_radius: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
  473. outer_radius: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
  474. data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
  475. sync_id: Optional[Union[Var[str], str]] = None,
  476. sync_method: Optional[
  477. Union[Var[Literal["index", "value"]], Literal["index", "value"]]
  478. ] = None,
  479. width: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  480. height: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  481. layout: Optional[
  482. Union[
  483. Var[Literal["horizontal", "vertical"]],
  484. Literal["horizontal", "vertical"],
  485. ]
  486. ] = None,
  487. margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
  488. stack_offset: Optional[
  489. Union[
  490. Var[Literal["expand", "none", "wiggle", "silhouette"]],
  491. Literal["expand", "none", "wiggle", "silhouette"],
  492. ]
  493. ] = None,
  494. style: Optional[Style] = None,
  495. key: Optional[Any] = None,
  496. id: Optional[Any] = None,
  497. class_name: Optional[Any] = None,
  498. autofocus: Optional[bool] = None,
  499. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  500. on_click: Optional[
  501. Union[EventHandler, EventSpec, list, function, BaseVar]
  502. ] = None,
  503. on_mouse_enter: Optional[
  504. Union[EventHandler, EventSpec, list, function, BaseVar]
  505. ] = None,
  506. on_mouse_leave: Optional[
  507. Union[EventHandler, EventSpec, list, function, BaseVar]
  508. ] = None,
  509. on_mouse_move: Optional[
  510. Union[EventHandler, EventSpec, list, function, BaseVar]
  511. ] = None,
  512. **props
  513. ) -> "RadarChart":
  514. """Create a chart component.
  515. Args:
  516. *children: The children of the chart component.
  517. cx: The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage
  518. cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage
  519. start_angle: The angle of first radial direction line.
  520. 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'.
  521. 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
  522. 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
  523. data: The source data, in which each element is an object.
  524. 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.
  525. 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
  526. width: The width of chart container. String or Integer
  527. height: The height of chart container.
  528. layout: The layout of area in the chart. 'horizontal' | 'vertical'
  529. margin: The sizes of whitespace around the chart.
  530. 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'
  531. style: The style of the component.
  532. key: A unique key for the component.
  533. id: The id for the component.
  534. class_name: The class name for the component.
  535. autofocus: Whether the component should take the focus once the page is loaded
  536. custom_attrs: custom attribute
  537. **props: The properties of the chart component.
  538. Returns:
  539. The chart component wrapped in a responsive container.
  540. """
  541. ...
  542. class RadialBarChart(ChartBase):
  543. def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
  544. @overload
  545. @classmethod
  546. def create( # type: ignore
  547. cls,
  548. *children,
  549. cx: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
  550. cy: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
  551. start_angle: Optional[Union[Var[int], int]] = None,
  552. end_angle: Optional[Union[Var[int], int]] = None,
  553. inner_radius: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
  554. outer_radius: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
  555. bar_category_gap: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None,
  556. bar_gap: Optional[Union[Var[str], str]] = None,
  557. bar_size: Optional[Union[Var[int], int]] = None,
  558. data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
  559. sync_id: Optional[Union[Var[str], str]] = None,
  560. sync_method: Optional[
  561. Union[Var[Literal["index", "value"]], Literal["index", "value"]]
  562. ] = None,
  563. width: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  564. height: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  565. layout: Optional[
  566. Union[
  567. Var[Literal["horizontal", "vertical"]],
  568. Literal["horizontal", "vertical"],
  569. ]
  570. ] = None,
  571. margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
  572. stack_offset: Optional[
  573. Union[
  574. Var[Literal["expand", "none", "wiggle", "silhouette"]],
  575. Literal["expand", "none", "wiggle", "silhouette"],
  576. ]
  577. ] = None,
  578. style: Optional[Style] = None,
  579. key: Optional[Any] = None,
  580. id: Optional[Any] = None,
  581. class_name: Optional[Any] = None,
  582. autofocus: Optional[bool] = None,
  583. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  584. on_click: Optional[
  585. Union[EventHandler, EventSpec, list, function, BaseVar]
  586. ] = None,
  587. on_mouse_enter: Optional[
  588. Union[EventHandler, EventSpec, list, function, BaseVar]
  589. ] = None,
  590. on_mouse_leave: Optional[
  591. Union[EventHandler, EventSpec, list, function, BaseVar]
  592. ] = None,
  593. on_mouse_move: Optional[
  594. Union[EventHandler, EventSpec, list, function, BaseVar]
  595. ] = None,
  596. **props
  597. ) -> "RadialBarChart":
  598. """Create a chart component.
  599. Args:
  600. *children: The children of the chart component.
  601. cx: The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage
  602. cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage
  603. start_angle: The angle of first radial direction line.
  604. 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'.
  605. 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
  606. 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
  607. bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number
  608. bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
  609. 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.
  610. data: The source data, in which each element is an object.
  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. width: The width of chart container. String or Integer
  614. height: The height of chart container.
  615. layout: The layout of area in the chart. 'horizontal' | 'vertical'
  616. margin: The sizes of whitespace around the chart.
  617. 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'
  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 ScatterChart(ChartBase):
  630. def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
  631. @overload
  632. @classmethod
  633. def create( # type: ignore
  634. cls,
  635. *children,
  636. data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
  637. sync_id: Optional[Union[Var[str], str]] = None,
  638. sync_method: Optional[
  639. Union[Var[Literal["index", "value"]], Literal["index", "value"]]
  640. ] = None,
  641. width: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  642. height: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  643. layout: Optional[
  644. Union[
  645. Var[Literal["horizontal", "vertical"]],
  646. Literal["horizontal", "vertical"],
  647. ]
  648. ] = None,
  649. margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
  650. stack_offset: Optional[
  651. Union[
  652. Var[Literal["expand", "none", "wiggle", "silhouette"]],
  653. Literal["expand", "none", "wiggle", "silhouette"],
  654. ]
  655. ] = None,
  656. style: Optional[Style] = None,
  657. key: Optional[Any] = None,
  658. id: Optional[Any] = None,
  659. class_name: Optional[Any] = None,
  660. autofocus: Optional[bool] = None,
  661. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  662. on_click: Optional[
  663. Union[EventHandler, EventSpec, list, function, BaseVar]
  664. ] = None,
  665. on_mouse_enter: Optional[
  666. Union[EventHandler, EventSpec, list, function, BaseVar]
  667. ] = None,
  668. on_mouse_leave: Optional[
  669. Union[EventHandler, EventSpec, list, function, BaseVar]
  670. ] = None,
  671. on_mouse_move: Optional[
  672. Union[EventHandler, EventSpec, list, function, BaseVar]
  673. ] = None,
  674. on_mouse_out: Optional[
  675. Union[EventHandler, EventSpec, list, function, BaseVar]
  676. ] = None,
  677. on_mouse_over: Optional[
  678. Union[EventHandler, EventSpec, list, function, BaseVar]
  679. ] = None,
  680. **props
  681. ) -> "ScatterChart":
  682. """Create a chart component.
  683. Args:
  684. *children: The children of the chart component.
  685. data: The source data, in which each element is an object.
  686. 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.
  687. 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
  688. width: The width of chart container. String or Integer
  689. height: The height of chart container.
  690. layout: The layout of area in the chart. 'horizontal' | 'vertical'
  691. margin: The sizes of whitespace around the chart.
  692. 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'
  693. style: The style of the component.
  694. key: A unique key for the component.
  695. id: The id for the component.
  696. class_name: The class name for the component.
  697. autofocus: Whether the component should take the focus once the page is loaded
  698. custom_attrs: custom attribute
  699. **props: The properties of the chart component.
  700. Returns:
  701. The chart component wrapped in a responsive container.
  702. """
  703. ...
  704. class FunnelChart(RechartsCharts):
  705. def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
  706. @overload
  707. @classmethod
  708. def create( # type: ignore
  709. cls,
  710. *children,
  711. data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
  712. sync_id: Optional[Union[Var[str], str]] = None,
  713. sync_method: Optional[Union[Var[str], str]] = None,
  714. width: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  715. height: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  716. layout: Optional[Union[Var[str], str]] = None,
  717. margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
  718. stack_offset: Optional[
  719. Union[
  720. Var[Literal["expand", "none", "wiggle", "silhouette"]],
  721. Literal["expand", "none", "wiggle", "silhouette"],
  722. ]
  723. ] = 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, function, BaseVar]
  732. ] = None,
  733. on_mouse_enter: Optional[
  734. Union[EventHandler, EventSpec, list, function, BaseVar]
  735. ] = None,
  736. on_mouse_leave: Optional[
  737. Union[EventHandler, EventSpec, list, function, BaseVar]
  738. ] = None,
  739. on_mouse_move: Optional[
  740. Union[EventHandler, EventSpec, list, function, BaseVar]
  741. ] = None,
  742. **props
  743. ) -> "FunnelChart":
  744. """Create a new memoization leaf component.
  745. Args:
  746. *children: The children of the component.
  747. data: The source data, in which each element is an object.
  748. 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.
  749. 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
  750. width: The width of chart container. String or Integer
  751. height: The height of chart container.
  752. layout: The layout of bars in the chart. centeric
  753. margin: The sizes of whitespace around the chart.
  754. 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'
  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 props of the component.
  762. Returns:
  763. The memoization leaf
  764. """
  765. ...
  766. class Treemap(RechartsCharts):
  767. @overload
  768. @classmethod
  769. def create( # type: ignore
  770. cls,
  771. *children,
  772. width: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  773. height: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  774. data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
  775. data_key: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None,
  776. aspect_ratio: Optional[Union[Var[int], int]] = None,
  777. is_animation_active: Optional[Union[Var[bool], bool]] = None,
  778. animation_begin: Optional[Union[Var[int], int]] = None,
  779. animation_duration: Optional[Union[Var[int], int]] = None,
  780. animation_easing: Optional[
  781. Union[
  782. Var[Literal["ease", "ease-in", "ease-out", "ease-in-out", "linear"]],
  783. Literal["ease", "ease-in", "ease-out", "ease-in-out", "linear"],
  784. ]
  785. ] = None,
  786. style: Optional[Style] = None,
  787. key: Optional[Any] = None,
  788. id: Optional[Any] = None,
  789. class_name: Optional[Any] = None,
  790. autofocus: Optional[bool] = None,
  791. custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
  792. on_blur: Optional[
  793. Union[EventHandler, EventSpec, list, function, BaseVar]
  794. ] = None,
  795. on_click: Optional[
  796. Union[EventHandler, EventSpec, list, function, BaseVar]
  797. ] = None,
  798. on_context_menu: Optional[
  799. Union[EventHandler, EventSpec, list, function, BaseVar]
  800. ] = None,
  801. on_double_click: Optional[
  802. Union[EventHandler, EventSpec, list, function, BaseVar]
  803. ] = None,
  804. on_focus: Optional[
  805. Union[EventHandler, EventSpec, list, function, BaseVar]
  806. ] = None,
  807. on_mount: Optional[
  808. Union[EventHandler, EventSpec, list, function, BaseVar]
  809. ] = None,
  810. on_mouse_down: Optional[
  811. Union[EventHandler, EventSpec, list, function, BaseVar]
  812. ] = None,
  813. on_mouse_enter: Optional[
  814. Union[EventHandler, EventSpec, list, function, BaseVar]
  815. ] = None,
  816. on_mouse_leave: Optional[
  817. Union[EventHandler, EventSpec, list, function, BaseVar]
  818. ] = None,
  819. on_mouse_move: Optional[
  820. Union[EventHandler, EventSpec, list, function, BaseVar]
  821. ] = None,
  822. on_mouse_out: Optional[
  823. Union[EventHandler, EventSpec, list, function, BaseVar]
  824. ] = None,
  825. on_mouse_over: Optional[
  826. Union[EventHandler, EventSpec, list, function, BaseVar]
  827. ] = None,
  828. on_mouse_up: Optional[
  829. Union[EventHandler, EventSpec, list, function, BaseVar]
  830. ] = None,
  831. on_scroll: Optional[
  832. Union[EventHandler, EventSpec, list, function, BaseVar]
  833. ] = None,
  834. on_unmount: Optional[
  835. Union[EventHandler, EventSpec, list, function, BaseVar]
  836. ] = None,
  837. **props
  838. ) -> "Treemap":
  839. """Create a chart component.
  840. Args:
  841. *children: The children of the chart component.
  842. width: The width of chart container. String or Integer
  843. height: The height of chart container.
  844. data: data of treemap. Array
  845. data_key: The key of a group of data which should be unique in a treemap. String | Number | Function
  846. aspect_ratio: The treemap will try to keep every single rectangle's aspect ratio near the aspectRatio given. Number
  847. is_animation_active: If set false, animation of area will be disabled.
  848. animation_begin: Specifies when the animation should begin, the unit of this option is ms.
  849. animation_duration: Specifies the duration of animation, the unit of this option is ms.
  850. animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'
  851. style: The style of the component.
  852. key: A unique key for the component.
  853. id: The id for the component.
  854. class_name: The class name for the component.
  855. autofocus: Whether the component should take the focus once the page is loaded
  856. custom_attrs: custom attribute
  857. **props: The properties of the chart component.
  858. Returns:
  859. The Treemap component wrapped in a responsive container.
  860. """
  861. ...