diff --git a/reflex/components/recharts/cartesian.py b/reflex/components/recharts/cartesian.py index 06ca80dc5f..fe1e030065 100644 --- a/reflex/components/recharts/cartesian.py +++ b/reflex/components/recharts/cartesian.py @@ -601,20 +601,20 @@ class ErrorBar(Recharts): alias = "RechartsErrorBar" - # The direction of error bar. 'x' | 'y' | 'both' + # Only used for ScatterChart with error bars in two directions. Only accepts a value of "x" or "y" and makes the error bars lie in that direction. direction: Var[LiteralDirection] # The key of a group of data which should be unique in an area chart. data_key: Var[Union[str, int]] - # The width of the error bar ends. + # The width of the error bar ends. Default: 5 width: Var[int] - # The stroke color of error bar. + # The stroke color of error bar. Default: rx.color("gray", 8) stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 8)) - # The stroke width of error bar. - stroke_width: Var[int] + # The stroke width of error bar. Default: 1.5 + stroke_width: Var[Union[int, float]] class Reference(Recharts): diff --git a/reflex/components/recharts/cartesian.pyi b/reflex/components/recharts/cartesian.pyi index e7b186f6fd..aa9080a89e 100644 --- a/reflex/components/recharts/cartesian.pyi +++ b/reflex/components/recharts/cartesian.pyi @@ -1571,13 +1571,11 @@ class ErrorBar(Recharts): def create( # type: ignore cls, *children, - direction: Optional[ - Union[Literal["both", "x", "y"], Var[Literal["both", "x", "y"]]] - ] = None, + direction: Optional[Union[Literal["x", "y"], Var[Literal["x", "y"]]]] = None, data_key: Optional[Union[Var[Union[int, str]], int, str]] = None, width: Optional[Union[Var[int], int]] = None, stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None, - stroke_width: Optional[Union[Var[int], int]] = None, + stroke_width: Optional[Union[Var[Union[float, int]], float, int]] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -1625,11 +1623,11 @@ class ErrorBar(Recharts): Args: *children: The children of the component. - direction: The direction of error bar. 'x' | 'y' | 'both' + direction: Only used for ScatterChart with error bars in two directions. Only accepts a value of "x" or "y" and makes the error bars lie in that direction. data_key: The key of a group of data which should be unique in an area chart. - width: The width of the error bar ends. - stroke: The stroke color of error bar. - stroke_width: The stroke width of error bar. + width: The width of the error bar ends. Default: 5 + stroke: The stroke color of error bar. Default: rx.color("gray", 8) + stroke_width: The stroke width of error bar. Default: 1.5 style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/recharts/recharts.py b/reflex/components/recharts/recharts.py index adb7bfdf99..a9b54af831 100644 --- a/reflex/components/recharts/recharts.py +++ b/reflex/components/recharts/recharts.py @@ -131,6 +131,6 @@ class RechartsCharts(NoSSRComponent, MemoizationLeaf): "stepBefore", "stepAfter", ] -LiteralDirection = Literal["x", "y", "both"] +LiteralDirection = Literal["x", "y"] LiteralInterval = Literal["preserveStart", "preserveEnd", "preserveStartEnd"] LiteralSyncMethod = Literal["index", "value"] diff --git a/reflex/components/recharts/recharts.pyi b/reflex/components/recharts/recharts.pyi index 1f1937dc6e..14065a213b 100644 --- a/reflex/components/recharts/recharts.pyi +++ b/reflex/components/recharts/recharts.pyi @@ -242,6 +242,6 @@ LiteralAreaType = Literal[ "stepBefore", "stepAfter", ] -LiteralDirection = Literal["x", "y", "both"] +LiteralDirection = Literal["x", "y"] LiteralInterval = Literal["preserveStart", "preserveEnd", "preserveStartEnd"] LiteralSyncMethod = Literal["index", "value"]