From c3d7cd0da1fdd65ae9264425b619d2848954ceb4 Mon Sep 17 00:00:00 2001 From: Carlos <36110765+carlosabadia@users.noreply.github.com> Date: Fri, 11 Oct 2024 00:10:11 +0200 Subject: [PATCH] default props comment for PolarRadiusAxis (#4108) * default props comment for PolarRadiusAxis * update --- reflex/components/recharts/polar.py | 33 +++++++++++----------- reflex/components/recharts/polar.pyi | 41 +++++++++++++++++----------- 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/reflex/components/recharts/polar.py b/reflex/components/recharts/polar.py index 158c0e729..a57f28782 100644 --- a/reflex/components/recharts/polar.py +++ b/reflex/components/recharts/polar.py @@ -13,6 +13,7 @@ from .recharts import ( LiteralAnimationEasing, LiteralGridType, LiteralLegendType, + LiteralOrientationLeftRightMiddle, LiteralPolarRadiusType, LiteralScale, Recharts, @@ -322,46 +323,46 @@ class PolarRadiusAxis(Recharts): alias = "RechartsPolarRadiusAxis" - # The angle of radial direction line to display axis text. + # The angle of radial direction line to display axis text. Default: 0 angle: Var[int] - # The type of axis line. 'number' | 'category' + # The type of axis line. 'number' | 'category'. Default: "category" type_: Var[LiteralPolarRadiusType] - # Allow the axis has duplicated categorys or not when the type of axis is "category". + # Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True allow_duplicated_category: Var[bool] # The x-coordinate of center. - cx: Var[Union[int, str]] + cx: Var[int] # The y-coordinate of center. - cy: Var[Union[int, str]] + cy: Var[int] - # If set to true, the ticks of this axis are reversed. + # If set to true, the ticks of this axis are reversed. Default: False reversed: Var[bool] - # The orientation of axis text. - orientation: Var[str] + # The orientation of axis text. Default: "right" + orientation: Var[LiteralOrientationLeftRightMiddle] - # If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option. + # If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option. Default: True axis_line: Var[Union[bool, Dict[str, Any]]] - # The width or height of tick. - tick: Var[Union[int, str]] + # If false set, ticks will not be drawn. If true set, ticks will be drawn which have the props calculated internally. If object set, ticks will be drawn which have the props mergered by the internal calculated props and the option. Default: True + tick: Var[Union[bool, Dict[str, Any]]] - # The count of ticks. + # The count of axis ticks. Not used if 'type' is 'category'. Default: 5 tick_count: Var[int] - # If 'auto' set, the scale funtion is linear scale. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold' + # If 'auto' set, the scale funtion is linear scale. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto" scale: Var[LiteralScale] # Valid children components _valid_children: List[str] = ["Label"] - # The domain of the polar radius axis, specifying the minimum and maximum values. - domain: Var[List[int]] = LiteralVar.create([0, 250]) + # The domain of the polar radius axis, specifying the minimum and maximum values. Default: [0, "auto"] + domain: Var[List[Union[int, str]]] - # The stroke color of axis + # The stroke color of axis. Default: rx.color("gray", 10) stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 10)) def get_event_triggers(self) -> dict[str, Union[Var, Any]]: diff --git a/reflex/components/recharts/polar.pyi b/reflex/components/recharts/polar.pyi index be3bd2d09..1f1d324ec 100644 --- a/reflex/components/recharts/polar.pyi +++ b/reflex/components/recharts/polar.pyi @@ -531,14 +531,21 @@ class PolarRadiusAxis(Recharts): Union[Literal["category", "number"], Var[Literal["category", "number"]]] ] = None, allow_duplicated_category: Optional[Union[Var[bool], bool]] = None, - cx: Optional[Union[Var[Union[int, str]], int, str]] = None, - cy: Optional[Union[Var[Union[int, str]], int, str]] = None, + cx: Optional[Union[Var[int], int]] = None, + cy: Optional[Union[Var[int], int]] = None, reversed: Optional[Union[Var[bool], bool]] = None, - orientation: Optional[Union[Var[str], str]] = None, + orientation: Optional[ + Union[ + Literal["left", "middle", "right"], + Var[Literal["left", "middle", "right"]], + ] + ] = None, axis_line: Optional[ Union[Dict[str, Any], Var[Union[Dict[str, Any], bool]], bool] ] = None, - tick: Optional[Union[Var[Union[int, str]], int, str]] = None, + tick: Optional[ + Union[Dict[str, Any], Var[Union[Dict[str, Any], bool]], bool] + ] = None, tick_count: Optional[Union[Var[int], int]] = None, scale: Optional[ Union[ @@ -580,7 +587,9 @@ class PolarRadiusAxis(Recharts): ], ] ] = None, - domain: Optional[Union[List[int], Var[List[int]]]] = None, + domain: Optional[ + Union[List[Union[int, str]], Var[List[Union[int, str]]]] + ] = None, stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None, style: Optional[Style] = None, key: Optional[Any] = None, @@ -610,19 +619,19 @@ class PolarRadiusAxis(Recharts): Args: *children: The children of the component. - angle: The angle of radial direction line to display axis text. - type_: The type of axis line. 'number' | 'category' - allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". + angle: The angle of radial direction line to display axis text. Default: 0 + type_: The type of axis line. 'number' | 'category'. Default: "category" + allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True cx: The x-coordinate of center. cy: The y-coordinate of center. - reversed: If set to true, the ticks of this axis are reversed. - orientation: The orientation of axis text. - axis_line: If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option. - tick: The width or height of tick. - tick_count: The count of ticks. - scale: If 'auto' set, the scale funtion is linear scale. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold' - domain: The domain of the polar radius axis, specifying the minimum and maximum values. - stroke: The stroke color of axis + reversed: If set to true, the ticks of this axis are reversed. Default: False + orientation: The orientation of axis text. Default: "right" + axis_line: If false set, axis line will not be drawn. If true set, axis line will be drawn which have the props calculated internally. If object set, axis line will be drawn which have the props mergered by the internal calculated props and the option. Default: True + tick: If false set, ticks will not be drawn. If true set, ticks will be drawn which have the props calculated internally. If object set, ticks will be drawn which have the props mergered by the internal calculated props and the option. Default: True + tick_count: The count of axis ticks. Not used if 'type' is 'category'. Default: 5 + scale: If 'auto' set, the scale funtion is linear scale. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto" + domain: The domain of the polar radius axis, specifying the minimum and maximum values. Default: [0, "auto"] + stroke: The stroke color of axis. Default: rx.color("gray", 10) style: The style of the component. key: A unique key for the component. id: The id for the component.