From ec6990fb71db466e8fe5204d6a012693cf7af49a Mon Sep 17 00:00:00 2001 From: Carlos <36110765+carlosabadia@users.noreply.github.com> Date: Thu, 10 Oct 2024 22:04:49 +0200 Subject: [PATCH] default props comment for RadialBar (#4105) * default props comment for RadialBar * update --- reflex/components/recharts/polar.py | 21 +++++++----- reflex/components/recharts/polar.pyi | 51 +++++++++++++++++++++++----- 2 files changed, 54 insertions(+), 18 deletions(-) diff --git a/reflex/components/recharts/polar.py b/reflex/components/recharts/polar.py index 828000447..158c0e729 100644 --- a/reflex/components/recharts/polar.py +++ b/reflex/components/recharts/polar.py @@ -158,31 +158,34 @@ 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 of each bar. A positive value between 0 and 360. Default: 0 min_angle: Var[int] - # Type of legend - legend_type: Var[str] + # The type of icon in legend. If set to 'none', no legend item will be rendered. Default: "rect" + legend_type: Var[LiteralLegendType] - # If false set, labels will not be drawn. + # If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False label: Var[Union[bool, Dict[str, Any]]] - # If false set, background sector will not be drawn. + # If false set, background sector will not be drawn. Default: False background: Var[Union[bool, Dict[str, Any]]] - # If set false, animation of radial bars will be disabled. By default true in CSR, and false in SSR + # If set false, animation of radial bars will be disabled. Default: True is_animation_active: Var[bool] - # Specifies when the animation should begin, the unit of this option is ms. By default 0 + # Specifies when the animation should begin, the unit of this option is ms. Default: 0 animation_begin: Var[int] - # Specifies the duration of animation, the unit of this option is ms. By default 1500 + # Specifies the duration of animation, the unit of this option is ms. Default 1500 animation_duration: Var[int] - # The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. By default 'ease' + # The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. Default: "ease" animation_easing: Var[LiteralAnimationEasing] # Valid children components diff --git a/reflex/components/recharts/polar.pyi b/reflex/components/recharts/polar.pyi index 32e7e5b76..be3bd2d09 100644 --- a/reflex/components/recharts/polar.pyi +++ b/reflex/components/recharts/polar.pyi @@ -230,9 +230,41 @@ class RadialBar(Recharts): def create( # type: ignore cls, *children, + data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None, data_key: Optional[Union[Var[Union[int, str]], int, str]] = None, min_angle: Optional[Union[Var[int], int]] = None, - legend_type: Optional[Union[Var[str], str]] = None, + legend_type: Optional[ + Union[ + Literal[ + "circle", + "cross", + "diamond", + "line", + "none", + "plainline", + "rect", + "square", + "star", + "triangle", + "wye", + ], + Var[ + Literal[ + "circle", + "cross", + "diamond", + "line", + "none", + "plainline", + "rect", + "square", + "star", + "triangle", + "wye", + ] + ], + ] + ] = None, label: Optional[ Union[Dict[str, Any], Var[Union[Dict[str, Any], bool]], bool] ] = None, @@ -282,15 +314,16 @@ 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. - background: If false set, background sector will not be drawn. - is_animation_active: If set false, animation of radial bars will be disabled. By default true in CSR, and false in SSR - animation_begin: Specifies when the animation should begin, the unit of this option is ms. By default 0 - animation_duration: Specifies the duration of animation, the unit of this option is ms. By default 1500 - animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. By default 'ease' + min_angle: Min angle of each bar. A positive value between 0 and 360. Default: 0 + legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. Default: "rect" + label: If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False + background: If false set, background sector will not be drawn. Default: False + is_animation_active: If set false, animation of radial bars 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" style: The style of the component. key: A unique key for the component. id: The id for the component.