123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881 |
- """Stub file for reflex/components/recharts/charts.py"""
- # ------------------- DO NOT EDIT ----------------------
- # This file was generated by `reflex/utils/pyi_generator.py`!
- # ------------------------------------------------------
- from typing import Any, Dict, List, Literal, Optional, Union, overload
- from reflex.constants.colors import Color
- from reflex.event import EventType
- from reflex.style import Style
- from reflex.vars.base import Var
- from .recharts import RechartsCharts
- class ChartBase(RechartsCharts):
- @overload
- @classmethod
- def create( # type: ignore
- cls,
- *children,
- width: Optional[Union[Var[Union[int, str]], int, str]] = None,
- height: Optional[Union[Var[Union[int, str]], int, str]] = None,
- style: Optional[Style] = None,
- key: Optional[Any] = None,
- id: Optional[Any] = None,
- class_name: Optional[Any] = None,
- autofocus: Optional[bool] = None,
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
- on_blur: Optional[EventType[()]] = None,
- on_click: Optional[EventType[()]] = None,
- on_context_menu: Optional[EventType[()]] = None,
- on_double_click: Optional[EventType[()]] = None,
- on_focus: Optional[EventType[()]] = None,
- on_mount: Optional[EventType[()]] = None,
- on_mouse_down: Optional[EventType[()]] = None,
- on_mouse_enter: Optional[EventType[()]] = None,
- on_mouse_leave: Optional[EventType[()]] = None,
- on_mouse_move: Optional[EventType[()]] = None,
- on_mouse_out: Optional[EventType[()]] = None,
- on_mouse_over: Optional[EventType[()]] = None,
- on_mouse_up: Optional[EventType[()]] = None,
- on_scroll: Optional[EventType[()]] = None,
- on_unmount: Optional[EventType[()]] = None,
- **props,
- ) -> "ChartBase":
- """Create a chart component.
- Args:
- *children: The children of the chart component.
- width: The width of chart container. String or Integer
- height: The height of chart container.
- on_click: The customized event handler of click on the component in this chart
- on_mouse_enter: The customized event handler of mouseenter on the component in this chart
- on_mouse_move: The customized event handler of mousemove on the component in this chart
- on_mouse_leave: The customized event handler of mouseleave on the component in this chart
- style: The style of the component.
- key: A unique key for the component.
- id: The id for the component.
- class_name: The class name for the component.
- autofocus: Whether the component should take the focus once the page is loaded
- custom_attrs: custom attribute
- **props: The properties of the chart component.
- Returns:
- The chart component wrapped in a responsive container.
- """
- ...
- class CategoricalChartBase(ChartBase):
- @overload
- @classmethod
- def create( # type: ignore
- cls,
- *children,
- data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
- margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
- sync_id: Optional[Union[Var[str], str]] = None,
- sync_method: Optional[
- Union[Literal["index", "value"], Var[Literal["index", "value"]]]
- ] = None,
- layout: Optional[
- Union[
- Literal["horizontal", "vertical"],
- Var[Literal["horizontal", "vertical"]],
- ]
- ] = None,
- stack_offset: Optional[
- Union[
- Literal["expand", "none", "silhouette", "wiggle"],
- Var[Literal["expand", "none", "silhouette", "wiggle"]],
- ]
- ] = None,
- width: Optional[Union[Var[Union[int, str]], int, str]] = None,
- height: Optional[Union[Var[Union[int, str]], int, str]] = None,
- style: Optional[Style] = None,
- key: Optional[Any] = None,
- id: Optional[Any] = None,
- class_name: Optional[Any] = None,
- autofocus: Optional[bool] = None,
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
- on_blur: Optional[EventType[()]] = None,
- on_click: Optional[EventType[()]] = None,
- on_context_menu: Optional[EventType[()]] = None,
- on_double_click: Optional[EventType[()]] = None,
- on_focus: Optional[EventType[()]] = None,
- on_mount: Optional[EventType[()]] = None,
- on_mouse_down: Optional[EventType[()]] = None,
- on_mouse_enter: Optional[EventType[()]] = None,
- on_mouse_leave: Optional[EventType[()]] = None,
- on_mouse_move: Optional[EventType[()]] = None,
- on_mouse_out: Optional[EventType[()]] = None,
- on_mouse_over: Optional[EventType[()]] = None,
- on_mouse_up: Optional[EventType[()]] = None,
- on_scroll: Optional[EventType[()]] = None,
- on_unmount: Optional[EventType[()]] = None,
- **props,
- ) -> "CategoricalChartBase":
- """Create a chart component.
- Args:
- *children: The children of the chart component.
- data: The source data, in which each element is an object.
- margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
- 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.
- 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. Default: "index"
- layout: The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
- 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'
- width: The width of chart container. String or Integer
- height: The height of chart container.
- on_click: The customized event handler of click on the component in this chart
- on_mouse_enter: The customized event handler of mouseenter on the component in this chart
- on_mouse_move: The customized event handler of mousemove on the component in this chart
- on_mouse_leave: The customized event handler of mouseleave on the component in this chart
- style: The style of the component.
- key: A unique key for the component.
- id: The id for the component.
- class_name: The class name for the component.
- autofocus: Whether the component should take the focus once the page is loaded
- custom_attrs: custom attribute
- **props: The properties of the chart component.
- Returns:
- The chart component wrapped in a responsive container.
- """
- ...
- class AreaChart(CategoricalChartBase):
- @overload
- @classmethod
- def create( # type: ignore
- cls,
- *children,
- base_value: Optional[
- Union[
- Literal["auto", "dataMax", "dataMin"],
- Var[Union[Literal["auto", "dataMax", "dataMin"], int]],
- int,
- ]
- ] = None,
- data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
- margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
- sync_id: Optional[Union[Var[str], str]] = None,
- sync_method: Optional[
- Union[Literal["index", "value"], Var[Literal["index", "value"]]]
- ] = None,
- layout: Optional[
- Union[
- Literal["horizontal", "vertical"],
- Var[Literal["horizontal", "vertical"]],
- ]
- ] = None,
- stack_offset: Optional[
- Union[
- Literal["expand", "none", "silhouette", "wiggle"],
- Var[Literal["expand", "none", "silhouette", "wiggle"]],
- ]
- ] = None,
- width: Optional[Union[Var[Union[int, str]], int, str]] = None,
- height: Optional[Union[Var[Union[int, str]], int, str]] = None,
- style: Optional[Style] = None,
- key: Optional[Any] = None,
- id: Optional[Any] = None,
- class_name: Optional[Any] = None,
- autofocus: Optional[bool] = None,
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
- on_blur: Optional[EventType[()]] = None,
- on_click: Optional[EventType[()]] = None,
- on_context_menu: Optional[EventType[()]] = None,
- on_double_click: Optional[EventType[()]] = None,
- on_focus: Optional[EventType[()]] = None,
- on_mount: Optional[EventType[()]] = None,
- on_mouse_down: Optional[EventType[()]] = None,
- on_mouse_enter: Optional[EventType[()]] = None,
- on_mouse_leave: Optional[EventType[()]] = None,
- on_mouse_move: Optional[EventType[()]] = None,
- on_mouse_out: Optional[EventType[()]] = None,
- on_mouse_over: Optional[EventType[()]] = None,
- on_mouse_up: Optional[EventType[()]] = None,
- on_scroll: Optional[EventType[()]] = None,
- on_unmount: Optional[EventType[()]] = None,
- **props,
- ) -> "AreaChart":
- """Create a chart component.
- Args:
- *children: The children of the chart component.
- base_value: The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'. Default: "auto"
- data: The source data, in which each element is an object.
- margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
- 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.
- 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. Default: "index"
- layout: The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
- 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'
- width: The width of chart container. String or Integer
- height: The height of chart container.
- on_click: The customized event handler of click on the component in this chart
- on_mouse_enter: The customized event handler of mouseenter on the component in this chart
- on_mouse_move: The customized event handler of mousemove on the component in this chart
- on_mouse_leave: The customized event handler of mouseleave on the component in this chart
- style: The style of the component.
- key: A unique key for the component.
- id: The id for the component.
- class_name: The class name for the component.
- autofocus: Whether the component should take the focus once the page is loaded
- custom_attrs: custom attribute
- **props: The properties of the chart component.
- Returns:
- The chart component wrapped in a responsive container.
- """
- ...
- class BarChart(CategoricalChartBase):
- @overload
- @classmethod
- def create( # type: ignore
- cls,
- *children,
- bar_category_gap: Optional[Union[Var[Union[int, str]], int, str]] = None,
- bar_gap: Optional[Union[Var[Union[int, str]], int, str]] = None,
- bar_size: Optional[Union[Var[int], int]] = None,
- max_bar_size: Optional[Union[Var[int], int]] = None,
- stack_offset: Optional[
- Union[
- Literal["expand", "none", "silhouette", "wiggle"],
- Var[Literal["expand", "none", "silhouette", "wiggle"]],
- ]
- ] = None,
- reverse_stack_order: Optional[Union[Var[bool], bool]] = None,
- data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
- margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
- sync_id: Optional[Union[Var[str], str]] = None,
- sync_method: Optional[
- Union[Literal["index", "value"], Var[Literal["index", "value"]]]
- ] = None,
- layout: Optional[
- Union[
- Literal["horizontal", "vertical"],
- Var[Literal["horizontal", "vertical"]],
- ]
- ] = None,
- width: Optional[Union[Var[Union[int, str]], int, str]] = None,
- height: Optional[Union[Var[Union[int, str]], int, str]] = None,
- style: Optional[Style] = None,
- key: Optional[Any] = None,
- id: Optional[Any] = None,
- class_name: Optional[Any] = None,
- autofocus: Optional[bool] = None,
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
- on_blur: Optional[EventType[()]] = None,
- on_click: Optional[EventType[()]] = None,
- on_context_menu: Optional[EventType[()]] = None,
- on_double_click: Optional[EventType[()]] = None,
- on_focus: Optional[EventType[()]] = None,
- on_mount: Optional[EventType[()]] = None,
- on_mouse_down: Optional[EventType[()]] = None,
- on_mouse_enter: Optional[EventType[()]] = None,
- on_mouse_leave: Optional[EventType[()]] = None,
- on_mouse_move: Optional[EventType[()]] = None,
- on_mouse_out: Optional[EventType[()]] = None,
- on_mouse_over: Optional[EventType[()]] = None,
- on_mouse_up: Optional[EventType[()]] = None,
- on_scroll: Optional[EventType[()]] = None,
- on_unmount: Optional[EventType[()]] = None,
- **props,
- ) -> "BarChart":
- """Create a chart component.
- Args:
- *children: The children of the chart component.
- bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number. Default: "10%"
- bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number. Default: 4
- bar_size: The width of all the bars in the chart. Number
- max_bar_size: The maximum width of all the bars in a horizontal BarChart, or maximum height in a vertical BarChart.
- 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'
- 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.) Default: False
- data: The source data, in which each element is an object.
- margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
- 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.
- 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. Default: "index"
- layout: The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
- width: The width of chart container. String or Integer
- height: The height of chart container.
- on_click: The customized event handler of click on the component in this chart
- on_mouse_enter: The customized event handler of mouseenter on the component in this chart
- on_mouse_move: The customized event handler of mousemove on the component in this chart
- on_mouse_leave: The customized event handler of mouseleave on the component in this chart
- style: The style of the component.
- key: A unique key for the component.
- id: The id for the component.
- class_name: The class name for the component.
- autofocus: Whether the component should take the focus once the page is loaded
- custom_attrs: custom attribute
- **props: The properties of the chart component.
- Returns:
- The chart component wrapped in a responsive container.
- """
- ...
- class LineChart(CategoricalChartBase):
- @overload
- @classmethod
- def create( # type: ignore
- cls,
- *children,
- data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
- margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
- sync_id: Optional[Union[Var[str], str]] = None,
- sync_method: Optional[
- Union[Literal["index", "value"], Var[Literal["index", "value"]]]
- ] = None,
- layout: Optional[
- Union[
- Literal["horizontal", "vertical"],
- Var[Literal["horizontal", "vertical"]],
- ]
- ] = None,
- stack_offset: Optional[
- Union[
- Literal["expand", "none", "silhouette", "wiggle"],
- Var[Literal["expand", "none", "silhouette", "wiggle"]],
- ]
- ] = None,
- width: Optional[Union[Var[Union[int, str]], int, str]] = None,
- height: Optional[Union[Var[Union[int, str]], int, str]] = None,
- style: Optional[Style] = None,
- key: Optional[Any] = None,
- id: Optional[Any] = None,
- class_name: Optional[Any] = None,
- autofocus: Optional[bool] = None,
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
- on_blur: Optional[EventType[()]] = None,
- on_click: Optional[EventType[()]] = None,
- on_context_menu: Optional[EventType[()]] = None,
- on_double_click: Optional[EventType[()]] = None,
- on_focus: Optional[EventType[()]] = None,
- on_mount: Optional[EventType[()]] = None,
- on_mouse_down: Optional[EventType[()]] = None,
- on_mouse_enter: Optional[EventType[()]] = None,
- on_mouse_leave: Optional[EventType[()]] = None,
- on_mouse_move: Optional[EventType[()]] = None,
- on_mouse_out: Optional[EventType[()]] = None,
- on_mouse_over: Optional[EventType[()]] = None,
- on_mouse_up: Optional[EventType[()]] = None,
- on_scroll: Optional[EventType[()]] = None,
- on_unmount: Optional[EventType[()]] = None,
- **props,
- ) -> "LineChart":
- """Create a chart component.
- Args:
- *children: The children of the chart component.
- data: The source data, in which each element is an object.
- margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
- 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.
- 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. Default: "index"
- layout: The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
- 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'
- width: The width of chart container. String or Integer
- height: The height of chart container.
- on_click: The customized event handler of click on the component in this chart
- on_mouse_enter: The customized event handler of mouseenter on the component in this chart
- on_mouse_move: The customized event handler of mousemove on the component in this chart
- on_mouse_leave: The customized event handler of mouseleave on the component in this chart
- style: The style of the component.
- key: A unique key for the component.
- id: The id for the component.
- class_name: The class name for the component.
- autofocus: Whether the component should take the focus once the page is loaded
- custom_attrs: custom attribute
- **props: The properties of the chart component.
- Returns:
- The chart component wrapped in a responsive container.
- """
- ...
- class ComposedChart(CategoricalChartBase):
- @overload
- @classmethod
- def create( # type: ignore
- cls,
- *children,
- base_value: Optional[
- Union[
- Literal["auto", "dataMax", "dataMin"],
- Var[Union[Literal["auto", "dataMax", "dataMin"], int]],
- int,
- ]
- ] = None,
- bar_category_gap: Optional[Union[Var[Union[int, str]], int, str]] = None,
- bar_gap: Optional[Union[Var[int], int]] = None,
- bar_size: Optional[Union[Var[int], int]] = None,
- reverse_stack_order: Optional[Union[Var[bool], bool]] = None,
- data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
- margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
- sync_id: Optional[Union[Var[str], str]] = None,
- sync_method: Optional[
- Union[Literal["index", "value"], Var[Literal["index", "value"]]]
- ] = None,
- layout: Optional[
- Union[
- Literal["horizontal", "vertical"],
- Var[Literal["horizontal", "vertical"]],
- ]
- ] = None,
- stack_offset: Optional[
- Union[
- Literal["expand", "none", "silhouette", "wiggle"],
- Var[Literal["expand", "none", "silhouette", "wiggle"]],
- ]
- ] = None,
- width: Optional[Union[Var[Union[int, str]], int, str]] = None,
- height: Optional[Union[Var[Union[int, str]], int, str]] = None,
- style: Optional[Style] = None,
- key: Optional[Any] = None,
- id: Optional[Any] = None,
- class_name: Optional[Any] = None,
- autofocus: Optional[bool] = None,
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
- on_blur: Optional[EventType[()]] = None,
- on_click: Optional[EventType[()]] = None,
- on_context_menu: Optional[EventType[()]] = None,
- on_double_click: Optional[EventType[()]] = None,
- on_focus: Optional[EventType[()]] = None,
- on_mount: Optional[EventType[()]] = None,
- on_mouse_down: Optional[EventType[()]] = None,
- on_mouse_enter: Optional[EventType[()]] = None,
- on_mouse_leave: Optional[EventType[()]] = None,
- on_mouse_move: Optional[EventType[()]] = None,
- on_mouse_out: Optional[EventType[()]] = None,
- on_mouse_over: Optional[EventType[()]] = None,
- on_mouse_up: Optional[EventType[()]] = None,
- on_scroll: Optional[EventType[()]] = None,
- on_unmount: Optional[EventType[()]] = None,
- **props,
- ) -> "ComposedChart":
- """Create a chart component.
- Args:
- *children: The children of the chart component.
- base_value: The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'. Default: "auto"
- bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number. Default: "10%"
- bar_gap: The gap between two bars in the same category. Default: 4
- bar_size: The width or height of each bar. If the barSize is not specified, the size of the bar will be calculated by the barCategoryGap, barGap and the quantity of bar groups.
- 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). Default: False
- data: The source data, in which each element is an object.
- margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
- 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.
- 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. Default: "index"
- layout: The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
- 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'
- width: The width of chart container. String or Integer
- height: The height of chart container.
- on_click: The customized event handler of click on the component in this chart
- on_mouse_enter: The customized event handler of mouseenter on the component in this chart
- on_mouse_move: The customized event handler of mousemove on the component in this chart
- on_mouse_leave: The customized event handler of mouseleave on the component in this chart
- style: The style of the component.
- key: A unique key for the component.
- id: The id for the component.
- class_name: The class name for the component.
- autofocus: Whether the component should take the focus once the page is loaded
- custom_attrs: custom attribute
- **props: The properties of the chart component.
- Returns:
- The chart component wrapped in a responsive container.
- """
- ...
- class PieChart(ChartBase):
- @overload
- @classmethod
- def create( # type: ignore
- cls,
- *children,
- margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
- width: Optional[Union[Var[Union[int, str]], int, str]] = None,
- height: Optional[Union[Var[Union[int, str]], int, str]] = None,
- style: Optional[Style] = None,
- key: Optional[Any] = None,
- id: Optional[Any] = None,
- class_name: Optional[Any] = None,
- autofocus: Optional[bool] = None,
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
- on_blur: Optional[EventType[()]] = None,
- on_click: Optional[EventType[()]] = None,
- on_context_menu: Optional[EventType[()]] = None,
- on_double_click: Optional[EventType[()]] = None,
- on_focus: Optional[EventType[()]] = None,
- on_mount: Optional[EventType[()]] = None,
- on_mouse_down: Optional[EventType[()]] = None,
- on_mouse_enter: Optional[EventType[()]] = None,
- on_mouse_leave: Optional[EventType[()]] = None,
- on_mouse_move: Optional[EventType[()]] = None,
- on_mouse_out: Optional[EventType[()]] = None,
- on_mouse_over: Optional[EventType[()]] = None,
- on_mouse_up: Optional[EventType[()]] = None,
- on_scroll: Optional[EventType[()]] = None,
- on_unmount: Optional[EventType[()]] = None,
- **props,
- ) -> "PieChart":
- """Create a chart component.
- Args:
- *children: The children of the chart component.
- margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
- on_mouse_down: The customized event handler of mousedown on the sectors in this group
- on_mouse_up: The customized event handler of mouseup on the sectors in this group
- on_mouse_over: The customized event handler of mouseover on the sectors in this group
- on_mouse_out: The customized event handler of mouseout on the sectors in this group
- width: The width of chart container. String or Integer
- height: The height of chart container.
- on_click: The customized event handler of click on the component in this chart
- on_mouse_enter: The customized event handler of mouseenter on the component in this chart
- on_mouse_move: The customized event handler of mousemove on the component in this chart
- on_mouse_leave: The customized event handler of mouseleave on the component in this chart
- style: The style of the component.
- key: A unique key for the component.
- id: The id for the component.
- class_name: The class name for the component.
- autofocus: Whether the component should take the focus once the page is loaded
- custom_attrs: custom attribute
- **props: The properties of the chart component.
- Returns:
- The chart component wrapped in a responsive container.
- """
- ...
- class RadarChart(ChartBase):
- def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
- @overload
- @classmethod
- def create( # type: ignore
- cls,
- *children,
- data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
- margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
- cx: Optional[Union[Var[Union[int, str]], int, str]] = None,
- cy: Optional[Union[Var[Union[int, str]], int, str]] = None,
- start_angle: Optional[Union[Var[int], int]] = None,
- end_angle: Optional[Union[Var[int], int]] = None,
- inner_radius: Optional[Union[Var[Union[int, str]], int, str]] = None,
- outer_radius: Optional[Union[Var[Union[int, str]], int, str]] = None,
- width: Optional[Union[Var[Union[int, str]], int, str]] = None,
- height: Optional[Union[Var[Union[int, str]], int, str]] = None,
- style: Optional[Style] = None,
- key: Optional[Any] = None,
- id: Optional[Any] = None,
- class_name: Optional[Any] = None,
- autofocus: Optional[bool] = None,
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
- on_click: Optional[EventType[()]] = None,
- on_mouse_enter: Optional[EventType[()]] = None,
- on_mouse_leave: Optional[EventType[()]] = None,
- **props,
- ) -> "RadarChart":
- """Create a chart component.
- Args:
- *children: The children of the chart component.
- data: The source data, in which each element is an object.
- margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}. Default: {"top": 0, "right": 0, "left": 0, "bottom": 0}
- cx: The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage. Default: "50%"
- cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage. Default: "50%"
- start_angle: The angle of first radial direction line. Default: 90
- 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'. Default: -270
- 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. Default: 0
- 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. Default: "80%"
- width: The width of chart container. String or Integer
- height: The height of chart container.
- on_click: The customized event handler of click on the component in this chart
- on_mouse_enter: The customized event handler of mouseenter on the component in this chart
- on_mouse_leave: The customized event handler of mouseleave on the component in this chart
- style: The style of the component.
- key: A unique key for the component.
- id: The id for the component.
- class_name: The class name for the component.
- autofocus: Whether the component should take the focus once the page is loaded
- custom_attrs: custom attribute
- **props: The properties of the chart component.
- Returns:
- The chart component wrapped in a responsive container.
- """
- ...
- class RadialBarChart(ChartBase):
- @overload
- @classmethod
- def create( # type: ignore
- cls,
- *children,
- data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
- margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
- cx: Optional[Union[Var[Union[int, str]], int, str]] = None,
- cy: Optional[Union[Var[Union[int, str]], int, str]] = None,
- start_angle: Optional[Union[Var[int], int]] = None,
- end_angle: Optional[Union[Var[int], int]] = None,
- inner_radius: Optional[Union[Var[Union[int, str]], int, str]] = None,
- outer_radius: Optional[Union[Var[Union[int, str]], int, str]] = None,
- bar_category_gap: Optional[Union[Var[Union[int, str]], int, str]] = None,
- bar_gap: Optional[Union[Var[str], str]] = None,
- bar_size: Optional[Union[Var[int], int]] = None,
- width: Optional[Union[Var[Union[int, str]], int, str]] = None,
- height: Optional[Union[Var[Union[int, str]], int, str]] = None,
- style: Optional[Style] = None,
- key: Optional[Any] = None,
- id: Optional[Any] = None,
- class_name: Optional[Any] = None,
- autofocus: Optional[bool] = None,
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
- on_blur: Optional[EventType[()]] = None,
- on_click: Optional[EventType[()]] = None,
- on_context_menu: Optional[EventType[()]] = None,
- on_double_click: Optional[EventType[()]] = None,
- on_focus: Optional[EventType[()]] = None,
- on_mount: Optional[EventType[()]] = None,
- on_mouse_down: Optional[EventType[()]] = None,
- on_mouse_enter: Optional[EventType[()]] = None,
- on_mouse_leave: Optional[EventType[()]] = None,
- on_mouse_move: Optional[EventType[()]] = None,
- on_mouse_out: Optional[EventType[()]] = None,
- on_mouse_over: Optional[EventType[()]] = None,
- on_mouse_up: Optional[EventType[()]] = None,
- on_scroll: Optional[EventType[()]] = None,
- on_unmount: Optional[EventType[()]] = None,
- **props,
- ) -> "RadialBarChart":
- """Create a chart component.
- Args:
- *children: The children of the chart component.
- data: The source data which each element is an object.
- margin: The sizes of whitespace around the chart. Default: {"top": 5, "right": 5, "left": 5 "bottom": 5}
- cx: The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage. Default: "50%"
- cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage. Default: "50%"
- start_angle: The angle of first radial direction line. Default: 0
- 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'. Default: 360
- 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. Default: "30%"
- 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. Default: "100%"
- bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number. Default: "10%"
- bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number. Default: 4
- 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.
- width: The width of chart container. String or Integer
- height: The height of chart container.
- on_click: The customized event handler of click on the component in this chart
- on_mouse_enter: The customized event handler of mouseenter on the component in this chart
- on_mouse_move: The customized event handler of mousemove on the component in this chart
- on_mouse_leave: The customized event handler of mouseleave on the component in this chart
- style: The style of the component.
- key: A unique key for the component.
- id: The id for the component.
- class_name: The class name for the component.
- autofocus: Whether the component should take the focus once the page is loaded
- custom_attrs: custom attribute
- **props: The properties of the chart component.
- Returns:
- The chart component wrapped in a responsive container.
- """
- ...
- class ScatterChart(ChartBase):
- def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
- @overload
- @classmethod
- def create( # type: ignore
- cls,
- *children,
- margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
- width: Optional[Union[Var[Union[int, str]], int, str]] = None,
- height: Optional[Union[Var[Union[int, str]], int, str]] = None,
- style: Optional[Style] = None,
- key: Optional[Any] = None,
- id: Optional[Any] = None,
- class_name: Optional[Any] = None,
- autofocus: Optional[bool] = None,
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
- on_click: Optional[EventType[()]] = None,
- on_mouse_down: Optional[EventType[()]] = None,
- on_mouse_enter: Optional[EventType[()]] = None,
- on_mouse_leave: Optional[EventType[()]] = None,
- on_mouse_move: Optional[EventType[()]] = None,
- on_mouse_out: Optional[EventType[()]] = None,
- on_mouse_over: Optional[EventType[()]] = None,
- on_mouse_up: Optional[EventType[()]] = None,
- **props,
- ) -> "ScatterChart":
- """Create a chart component.
- Args:
- *children: The children of the chart component.
- margin: The sizes of whitespace around the chart. Default: {"top": 5, "right": 5, "bottom": 5, "left": 5}
- width: The width of chart container. String or Integer
- height: The height of chart container.
- on_click: The customized event handler of click on the component in this chart
- on_mouse_enter: The customized event handler of mouseenter on the component in this chart
- on_mouse_move: The customized event handler of mousemove on the component in this chart
- on_mouse_leave: The customized event handler of mouseleave on the component in this chart
- style: The style of the component.
- key: A unique key for the component.
- id: The id for the component.
- class_name: The class name for the component.
- autofocus: Whether the component should take the focus once the page is loaded
- custom_attrs: custom attribute
- **props: The properties of the chart component.
- Returns:
- The chart component wrapped in a responsive container.
- """
- ...
- class FunnelChart(ChartBase):
- @overload
- @classmethod
- def create( # type: ignore
- cls,
- *children,
- layout: Optional[Union[Var[str], str]] = None,
- margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
- stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
- width: Optional[Union[Var[Union[int, str]], int, str]] = None,
- height: Optional[Union[Var[Union[int, str]], int, str]] = None,
- style: Optional[Style] = None,
- key: Optional[Any] = None,
- id: Optional[Any] = None,
- class_name: Optional[Any] = None,
- autofocus: Optional[bool] = None,
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
- on_blur: Optional[EventType[()]] = None,
- on_click: Optional[EventType[()]] = None,
- on_context_menu: Optional[EventType[()]] = None,
- on_double_click: Optional[EventType[()]] = None,
- on_focus: Optional[EventType[()]] = None,
- on_mount: Optional[EventType[()]] = None,
- on_mouse_down: Optional[EventType[()]] = None,
- on_mouse_enter: Optional[EventType[()]] = None,
- on_mouse_leave: Optional[EventType[()]] = None,
- on_mouse_move: Optional[EventType[()]] = None,
- on_mouse_out: Optional[EventType[()]] = None,
- on_mouse_over: Optional[EventType[()]] = None,
- on_mouse_up: Optional[EventType[()]] = None,
- on_scroll: Optional[EventType[()]] = None,
- on_unmount: Optional[EventType[()]] = None,
- **props,
- ) -> "FunnelChart":
- """Create a chart component.
- Args:
- *children: The children of the chart component.
- layout: The layout of bars in the chart. Default: "centric"
- margin: The sizes of whitespace around the chart. Default: {"top": 5, "right": 5, "bottom": 5, "left": 5}
- stroke: The stroke color of each bar. String | Object
- width: The width of chart container. String or Integer
- height: The height of chart container.
- on_click: The customized event handler of click on the component in this chart
- on_mouse_enter: The customized event handler of mouseenter on the component in this chart
- on_mouse_move: The customized event handler of mousemove on the component in this chart
- on_mouse_leave: The customized event handler of mouseleave on the component in this chart
- style: The style of the component.
- key: A unique key for the component.
- id: The id for the component.
- class_name: The class name for the component.
- autofocus: Whether the component should take the focus once the page is loaded
- custom_attrs: custom attribute
- **props: The properties of the chart component.
- Returns:
- The chart component wrapped in a responsive container.
- """
- ...
- class Treemap(RechartsCharts):
- @overload
- @classmethod
- def create( # type: ignore
- cls,
- *children,
- width: Optional[Union[Var[Union[int, str]], int, str]] = None,
- height: Optional[Union[Var[Union[int, str]], int, str]] = None,
- data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
- data_key: Optional[Union[Var[Union[int, str]], int, str]] = None,
- name_key: Optional[Union[Var[str], str]] = None,
- aspect_ratio: Optional[Union[Var[int], int]] = None,
- is_animation_active: Optional[Union[Var[bool], bool]] = None,
- animation_begin: Optional[Union[Var[int], int]] = None,
- animation_duration: Optional[Union[Var[int], int]] = None,
- animation_easing: Optional[
- Union[
- Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"],
- Var[Literal["ease", "ease-in", "ease-in-out", "ease-out", "linear"]],
- ]
- ] = None,
- style: Optional[Style] = None,
- key: Optional[Any] = None,
- id: Optional[Any] = None,
- class_name: Optional[Any] = None,
- autofocus: Optional[bool] = None,
- custom_attrs: Optional[Dict[str, Union[Var, Any]]] = None,
- on_animation_end: Optional[EventType[()]] = None,
- on_animation_start: Optional[EventType[()]] = None,
- on_blur: Optional[EventType[()]] = None,
- on_click: Optional[EventType[()]] = None,
- on_context_menu: Optional[EventType[()]] = None,
- on_double_click: Optional[EventType[()]] = None,
- on_focus: Optional[EventType[()]] = None,
- on_mount: Optional[EventType[()]] = None,
- on_mouse_down: Optional[EventType[()]] = None,
- on_mouse_enter: Optional[EventType[()]] = None,
- on_mouse_leave: Optional[EventType[()]] = None,
- on_mouse_move: Optional[EventType[()]] = None,
- on_mouse_out: Optional[EventType[()]] = None,
- on_mouse_over: Optional[EventType[()]] = None,
- on_mouse_up: Optional[EventType[()]] = None,
- on_scroll: Optional[EventType[()]] = None,
- on_unmount: Optional[EventType[()]] = None,
- **props,
- ) -> "Treemap":
- """Create a chart component.
- Args:
- *children: The children of the chart component.
- width: The width of chart container. String or Integer. Default: "100%"
- height: The height of chart container. String or Integer. Default: "100%"
- data: data of treemap. Array
- data_key: The key of a group of data which should be unique in a treemap. String | Number. Default: "value"
- name_key: The key of each sector's name. String. Default: "name"
- aspect_ratio: The treemap will try to keep every single rectangle's aspect ratio near the aspectRatio given. Number
- is_animation_active: If set false, animation of area will be disabled. Default: True
- animation_begin: Specifies when the animation should begin, the unit of this option is ms. Default: 0
- animation_duration: Specifies the duration of animation, the unit of this option is ms. Default: 1500
- animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. Default: "ease"
- on_animation_start: The customized event handler of animation start
- on_animation_end: The customized event handler of animation end
- style: The style of the component.
- key: A unique key for the component.
- id: The id for the component.
- class_name: The class name for the component.
- autofocus: Whether the component should take the focus once the page is loaded
- custom_attrs: custom attribute
- **props: The properties of the chart component.
- Returns:
- The Treemap component wrapped in a responsive container.
- """
- ...
- area_chart = AreaChart.create
- bar_chart = BarChart.create
- line_chart = LineChart.create
- composed_chart = ComposedChart.create
- pie_chart = PieChart.create
- radar_chart = RadarChart.create
- radial_bar_chart = RadialBarChart.create
- scatter_chart = ScatterChart.create
- funnel_chart = FunnelChart.create
- treemap = Treemap.create
|