Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default props comment for ErrorBar #4120

Merged
merged 3 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions reflex/components/recharts/cartesian.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
14 changes: 6 additions & 8 deletions reflex/components/recharts/cartesian.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion reflex/components/recharts/recharts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion reflex/components/recharts/recharts.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Loading