reflex/reflex/components/recharts/charts.pyi
Khaleel Al-Adhami a5c73ad8e5
Use old serializer system in LiteralVar (#3875)
* use serializer system

* add checks for unsupported operands

* and and or are now supported

* format

* remove unnecessary call to JSON

* put base before rest

* fix failing testcase

* add hinting to get static analysis to complain

* damn

* big changes

* get typeguard from extensions

* please darglint

* dangit darglint

* remove one from vars

* add without data and use it in plotly

* DARGLINT

* change format for special props

* add pyi

* delete instances of Var.create

* modify client state to work

* fixed so much

* remove every Var.create

* delete all basevar stuff

* checkpoint

* fix pyi

* get older python to work

* dangit darglint

* add simple fix to last failing testcase

* remove var name unwrapped and put client state on immutable var

* fix older python

* fox event issues

* change forms pyi

* make test less strict

* use rx state directly

* add typeignore to page_id

* implement foreach

* delete .web states folder silly

* update reflex chakra

* fix issue when on mount or on unmount is not set

* nuke Var

* run pyi

* import immutablevar in critical location

* delete unwrap vars

* bring back array ref

* fix style props in app

* /health endpoint for K8 Liveness and Readiness probes (#3855)

* Added API Endpoint

* Added API Endpoint

* Added Unit Tests

* Added Unit Tests

* main

* Apply suggestions from Code Review

* Fix Ruff Formatting

* Update Socket Events

* Async Functions

* Update find_replace (#3886)

* [REF-3592]Promote `rx.progress` from radix themes (#3878)

* Promote `rx.progress` from radix themes

* fix pyi

* add warning when accessing `rx._x.progress`

* Use correct flexgen backend URL (#3891)

* Remove demo template (#3888)

* gitignore .web (#3885)

* update overflowY in AUTO_HEIGHT_JS from hidden to scroll (#3882)

* Retain mutability inside `async with self` block (#3884)

When emitting a state update, restore `_self_mutable` to the value it had
previously so that `yield` in the middle of `async with self` does not result
in an immutable StateProxy.

Fix #3869

* Include child imports in markdown component_map (#3883)

If a component in the markdown component_map contains children components, use
`_get_all_imports` to recursively enumerate them.

Fix #3880

* [REF-3570] Remove deprecated REDIS_URL syntax (#3892)

* mixin computed vars should only be applied to highest level state (#3833)

* improve state hierarchy validation, drop old testing special case (#3894)

* fix var dependency dicts (#3842)

* Adding array to array pluck operation. (#3868)

* fix initial state without cv fallback (#3670)

* add fragment to foreach (#3877)

* Update docker-example (#3324)

* /health endpoint for K8 Liveness and Readiness probes (#3855)

* Added API Endpoint

* Added API Endpoint

* Added Unit Tests

* Added Unit Tests

* main

* Apply suggestions from Code Review

* Fix Ruff Formatting

* Update Socket Events

* Async Functions

* /health endpoint for K8 Liveness and Readiness probes (#3855)

* Added API Endpoint

* Added API Endpoint

* Added Unit Tests

* Added Unit Tests

* main

* Apply suggestions from Code Review

* Fix Ruff Formatting

* Update Socket Events

* Async Functions

* Merge branch 'main' into use-old-serializer-in-literalvar

* [REF-3570] Remove deprecated REDIS_URL syntax (#3892)

* /health endpoint for K8 Liveness and Readiness probes (#3855)

* Added API Endpoint

* Added API Endpoint

* Added Unit Tests

* Added Unit Tests

* main

* Apply suggestions from Code Review

* Fix Ruff Formatting

* Update Socket Events

* Async Functions

* [REF-3570] Remove deprecated REDIS_URL syntax (#3892)

* remove extra var

Co-authored-by: Masen Furer <m_github@0x26.net>

* resolve typo

* write better doc for var.create

* return var value when we know it's literal var

* fix unit test

* less bloat for ToOperations

* simplify ImmutableComputedVar.__get__ (#3902)

* simplify ImmutableComputedVar.__get__

* ruff it

---------

Co-authored-by: Samarth Bhadane <samarthbhadane119@gmail.com>
Co-authored-by: Elijah Ahianyo <elijahahianyo@gmail.com>
Co-authored-by: Masen Furer <m_github@0x26.net>
Co-authored-by: benedikt-bartscher <31854409+benedikt-bartscher@users.noreply.github.com>
Co-authored-by: Vishnu Deva <vishnu.deva12@gmail.com>
Co-authored-by: abulvenz <a.eismann@senbax.de>
2024-09-10 11:43:37 -07:00

1160 lines
54 KiB
Python

"""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, Callable, Dict, List, Literal, Optional, Union, overload
from reflex.constants.colors import Color
from reflex.event import EventHandler, EventSpec
from reflex.ivars.base import ImmutableVar
from reflex.style import Style
from reflex.vars import Var
from .recharts import (
RechartsCharts,
)
class ChartBase(RechartsCharts):
@overload
@classmethod
def create( # type: ignore
cls,
*children,
width: Optional[Union[Var[Union[int, str]], str, int]] = None,
height: Optional[Union[Var[Union[int, str]], str, int]] = 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[ImmutableVar, str]]] = None,
on_blur: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_context_menu: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_double_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_focus: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_down: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_enter: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_leave: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_move: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_out: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_over: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_up: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_scroll: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_unmount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = 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.
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[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
sync_id: Optional[Union[Var[str], str]] = None,
sync_method: Optional[
Union[Var[Literal["index", "value"]], Literal["index", "value"]]
] = None,
layout: Optional[
Union[
Var[Literal["horizontal", "vertical"]],
Literal["horizontal", "vertical"],
]
] = None,
stack_offset: Optional[
Union[
Var[Literal["expand", "none", "wiggle", "silhouette"]],
Literal["expand", "none", "wiggle", "silhouette"],
]
] = None,
width: Optional[Union[Var[Union[int, str]], str, int]] = None,
height: Optional[Union[Var[Union[int, str]], str, int]] = 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[ImmutableVar, str]]] = None,
on_blur: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_context_menu: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_double_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_focus: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_down: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_enter: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_leave: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_move: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_out: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_over: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_up: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_scroll: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_unmount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = 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
layout: The layout of area in the chart. 'horizontal' | 'vertical'
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.
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[
Var[Union[Literal["dataMin", "dataMax", "auto"], int]],
int,
Literal["dataMin", "dataMax", "auto"],
]
] = None,
data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
sync_id: Optional[Union[Var[str], str]] = None,
sync_method: Optional[
Union[Var[Literal["index", "value"]], Literal["index", "value"]]
] = None,
layout: Optional[
Union[
Var[Literal["horizontal", "vertical"]],
Literal["horizontal", "vertical"],
]
] = None,
stack_offset: Optional[
Union[
Var[Literal["expand", "none", "wiggle", "silhouette"]],
Literal["expand", "none", "wiggle", "silhouette"],
]
] = None,
width: Optional[Union[Var[Union[int, str]], str, int]] = None,
height: Optional[Union[Var[Union[int, str]], str, int]] = 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[ImmutableVar, str]]] = None,
on_blur: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_context_menu: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_double_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_focus: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_down: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_enter: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_leave: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_move: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_out: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_over: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_up: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_scroll: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_unmount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = 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'
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
layout: The layout of area in the chart. 'horizontal' | 'vertical'
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.
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]], str, int]] = None,
bar_gap: Optional[Union[Var[Union[int, str]], str, int]] = None,
bar_size: Optional[Union[Var[int], int]] = None,
max_bar_size: Optional[Union[Var[int], int]] = None,
stack_offset: Optional[
Union[
Var[Literal["expand", "none", "wiggle", "silhouette"]],
Literal["expand", "none", "wiggle", "silhouette"],
]
] = None,
reverse_stack_order: Optional[Union[Var[bool], bool]] = None,
data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
sync_id: Optional[Union[Var[str], str]] = None,
sync_method: Optional[
Union[Var[Literal["index", "value"]], Literal["index", "value"]]
] = None,
layout: Optional[
Union[
Var[Literal["horizontal", "vertical"]],
Literal["horizontal", "vertical"],
]
] = None,
width: Optional[Union[Var[Union[int, str]], str, int]] = None,
height: Optional[Union[Var[Union[int, str]], str, int]] = 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[ImmutableVar, str]]] = None,
on_blur: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_context_menu: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_double_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_focus: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_down: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_enter: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_leave: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_move: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_out: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_over: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_up: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_scroll: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_unmount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = 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
bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
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.)
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
layout: The layout of area in the chart. 'horizontal' | 'vertical'
width: The width of chart container. String or Integer
height: The height of chart container.
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[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
sync_id: Optional[Union[Var[str], str]] = None,
sync_method: Optional[
Union[Var[Literal["index", "value"]], Literal["index", "value"]]
] = None,
layout: Optional[
Union[
Var[Literal["horizontal", "vertical"]],
Literal["horizontal", "vertical"],
]
] = None,
stack_offset: Optional[
Union[
Var[Literal["expand", "none", "wiggle", "silhouette"]],
Literal["expand", "none", "wiggle", "silhouette"],
]
] = None,
width: Optional[Union[Var[Union[int, str]], str, int]] = None,
height: Optional[Union[Var[Union[int, str]], str, int]] = 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[ImmutableVar, str]]] = None,
on_blur: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_context_menu: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_double_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_focus: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_down: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_enter: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_leave: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_move: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_out: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_over: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_up: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_scroll: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_unmount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = 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
layout: The layout of area in the chart. 'horizontal' | 'vertical'
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.
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[
Var[Union[Literal["dataMin", "dataMax", "auto"], int]],
int,
Literal["dataMin", "dataMax", "auto"],
]
] = None,
bar_category_gap: Optional[Union[Var[Union[int, str]], str, int]] = None,
bar_gap: Optional[Union[Var[Union[int, str]], str, int]] = None,
bar_size: Optional[Union[Var[int], int]] = None,
reverse_stack_order: Optional[Union[Var[bool], bool]] = None,
data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
sync_id: Optional[Union[Var[str], str]] = None,
sync_method: Optional[
Union[Var[Literal["index", "value"]], Literal["index", "value"]]
] = None,
layout: Optional[
Union[
Var[Literal["horizontal", "vertical"]],
Literal["horizontal", "vertical"],
]
] = None,
stack_offset: Optional[
Union[
Var[Literal["expand", "none", "wiggle", "silhouette"]],
Literal["expand", "none", "wiggle", "silhouette"],
]
] = None,
width: Optional[Union[Var[Union[int, str]], str, int]] = None,
height: Optional[Union[Var[Union[int, str]], str, int]] = 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[ImmutableVar, str]]] = None,
on_blur: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_context_menu: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_double_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_focus: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_down: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_enter: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_leave: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_move: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_out: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_over: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_up: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_scroll: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_unmount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = 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'
bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number
bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
bar_size: The width of all the bars in the chart. Number
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.)
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
layout: The layout of area in the chart. 'horizontal' | 'vertical'
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.
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[Var[Dict[str, Any]], Dict[str, Any]]] = None,
width: Optional[Union[Var[Union[int, str]], str, int]] = None,
height: Optional[Union[Var[Union[int, str]], str, int]] = 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[ImmutableVar, str]]] = None,
on_blur: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_context_menu: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_double_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_focus: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_down: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_enter: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_leave: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_move: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_out: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_over: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_up: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_scroll: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_unmount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = 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}.
width: The width of chart container. String or Integer
height: The height of chart container.
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[ImmutableVar, Any]]: ...
@overload
@classmethod
def create( # type: ignore
cls,
*children,
data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
margin: Optional[Union[Var[Dict[str, Any]], 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]], str, int]] = None,
height: Optional[Union[Var[Union[int, str]], str, int]] = 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[ImmutableVar, str]]] = None,
on_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_enter: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_leave: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = 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}.
cx: The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage
cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage
start_angle: The angle of first radial direction line.
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'.
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
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
width: The width of chart container. String or Integer
height: The height of chart container.
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[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
margin: Optional[Union[Var[Dict[str, Any]], 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]], str, int]] = None,
height: Optional[Union[Var[Union[int, str]], str, int]] = 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[ImmutableVar, str]]] = None,
on_blur: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_context_menu: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_double_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_focus: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_down: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_enter: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_leave: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_move: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_out: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_over: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_up: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_scroll: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_unmount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = 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, i.e. {"top": 50, "right": 30, "left": 20, "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
cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage
start_angle: The angle of first radial direction line.
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'.
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
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
bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number
bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
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.
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[ImmutableVar, Any]]: ...
@overload
@classmethod
def create( # type: ignore
cls,
*children,
margin: Optional[Union[Var[Dict[str, Any]], Dict[str, Any]]] = None,
width: Optional[Union[Var[Union[int, str]], str, int]] = None,
height: Optional[Union[Var[Union[int, str]], str, int]] = 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[ImmutableVar, str]]] = None,
on_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_down: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_enter: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_leave: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_move: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_out: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_over: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_up: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
**props,
) -> "ScatterChart":
"""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}.
width: The width of chart container. String or Integer
height: The height of chart container.
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[Var[Dict[str, Any]], Dict[str, Any]]] = None,
stroke: Optional[Union[Var[Union[Color, str]], str, Color]] = None,
width: Optional[Union[Var[Union[int, str]], str, int]] = None,
height: Optional[Union[Var[Union[int, str]], str, int]] = 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[ImmutableVar, str]]] = None,
on_blur: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_context_menu: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_double_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_focus: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_down: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_enter: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_leave: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_move: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_out: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_over: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_up: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_scroll: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_unmount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
**props,
) -> "FunnelChart":
"""Create a chart component.
Args:
*children: The children of the chart component.
layout: The layout of bars in the chart. centeric
margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 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.
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]], str, int]] = None,
height: Optional[Union[Var[Union[int, str]], str, int]] = None,
data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None,
data_key: Optional[Union[Var[Union[int, str]], str, int]] = 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[
Var[Literal["ease", "ease-in", "ease-out", "ease-in-out", "linear"]],
Literal["ease", "ease-in", "ease-out", "ease-in-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[ImmutableVar, str]]] = None,
on_animation_end: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_animation_start: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_blur: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_context_menu: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_double_click: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_focus: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_down: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_enter: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_leave: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_move: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_out: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_over: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_mouse_up: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_scroll: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
on_unmount: Optional[
Union[EventHandler, EventSpec, list, Callable, ImmutableVar]
] = None,
**props,
) -> "Treemap":
"""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.
data: data of treemap. Array
data_key: The key of a group of data which should be unique in a treemap. String | Number | Function
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.
animation_begin: Specifies when the animation should begin, the unit of this option is ms.
animation_duration: Specifies the duration of animation, the unit of this option is ms.
animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'
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