diff --git a/reflex/components/recharts/charts.py b/reflex/components/recharts/charts.py index 843f4b7d9..7cfa35a5a 100644 --- a/reflex/components/recharts/charts.py +++ b/reflex/components/recharts/charts.py @@ -287,6 +287,9 @@ class RadarChart(ChartBase): alias = "RechartsRadarChart" + # The source data, in which each element is an object. + data: Var[List[Dict[str, Any]]] + # The sizes of whitespace around the chart. margin: Var[Dict[str, Any]] @@ -338,6 +341,9 @@ class RadialBarChart(ChartBase): alias = "RechartsRadialBarChart" + # The source data which each element is an object. + data: Var[List[Dict[str, Any]]] + # The sizes of whitespace around the chart. margin: Var[Dict[str, Any]] diff --git a/reflex/components/recharts/charts.pyi b/reflex/components/recharts/charts.pyi index a6447c1d0..a516a5deb 100644 --- a/reflex/components/recharts/charts.pyi +++ b/reflex/components/recharts/charts.pyi @@ -511,6 +511,7 @@ class RadarChart(ChartBase): 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]], Union[int, str]]] = None, cy: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None, @@ -541,6 +542,7 @@ class RadarChart(ChartBase): 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. 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 @@ -570,6 +572,7 @@ class RadialBarChart(ChartBase): 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]], Union[int, str]]] = None, cy: Optional[Union[Var[Union[int, str]], Union[int, str]]] = None, @@ -603,6 +606,7 @@ class RadialBarChart(ChartBase): 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. 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 diff --git a/reflex/components/recharts/polar.py b/reflex/components/recharts/polar.py index 1ddecb5be..c64e965df 100644 --- a/reflex/components/recharts/polar.py +++ b/reflex/components/recharts/polar.py @@ -141,8 +141,8 @@ class RadialBar(Recharts): alias = "RechartsRadialBar" - # The source data which each element is an object. - data: Var[List[Dict[str, Any]]] + # The key of a group of data which should be unique to show the meaning of angle axis. + data_key: Var[Union[str, int]] # Min angle of each bar. A positive value between 0 and 360. min_angle: Var[int] @@ -151,7 +151,7 @@ class RadialBar(Recharts): legend_type: Var[str] # If false set, labels will not be drawn. - label: Var[bool] + label: Var[Union[bool, Dict[str, Any]]] # If false set, background sector will not be drawn. background: Var[bool] diff --git a/reflex/components/recharts/polar.pyi b/reflex/components/recharts/polar.pyi index 7c5352608..c248f4bb6 100644 --- a/reflex/components/recharts/polar.pyi +++ b/reflex/components/recharts/polar.pyi @@ -242,10 +242,12 @@ class RadialBar(Recharts): def create( # type: ignore cls, *children, - data: Optional[Union[Var[List[Dict[str, Any]]], List[Dict[str, Any]]]] = None, + data_key: Optional[Union[Var[Union[str, int]], Union[str, int]]] = None, min_angle: Optional[Union[Var[int], int]] = None, legend_type: Optional[Union[Var[str], str]] = None, - label: Optional[Union[Var[bool], bool]] = None, + label: Optional[ + Union[Var[Union[bool, Dict[str, Any]]], Union[bool, Dict[str, Any]]] + ] = None, background: Optional[Union[Var[bool], bool]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -277,7 +279,7 @@ class RadialBar(Recharts): Args: *children: The children of the component. - data: The source data which each element is an object. + data_key: The key of a group of data which should be unique to show the meaning of angle axis. min_angle: Min angle of each bar. A positive value between 0 and 360. legend_type: Type of legend label: If false set, labels will not be drawn.