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

Make domain props work for y_axis #3652

Merged
merged 2 commits into from
Jul 11, 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
3 changes: 3 additions & 0 deletions reflex/components/recharts/cartesian.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ class YAxis(Axis):
# The id of y-axis which is corresponding to the data.
y_axis_id: Var[Union[str, int]]

# The range of the axis. Work best in conjuction with allow_data_overflow.
domain: Var[List]


class ZAxis(Recharts):
"""A ZAxis component in Recharts."""
Expand Down
2 changes: 2 additions & 0 deletions reflex/components/recharts/cartesian.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ class YAxis(Axis):
Union[Var[Literal["left", "right"]], Literal["left", "right"]]
] = None,
y_axis_id: Optional[Union[Var[Union[int, str]], str, int]] = None,
domain: Optional[Union[Var[List], List]] = None,
data_key: Optional[Union[Var[Union[int, str]], str, int]] = None,
hide: Optional[Union[Var[bool], bool]] = None,
width: Optional[Union[Var[Union[int, str]], str, int]] = None,
Expand Down Expand Up @@ -493,6 +494,7 @@ class YAxis(Axis):
*children: The children of the component.
orientation: The orientation of axis 'left' | 'right'
y_axis_id: The id of y-axis which is corresponding to the data.
domain: The range of the axis. Work best in conjuction with allow_data_overflow.
data_key: The key of data displayed in the axis.
hide: If set true, the axis do not display in the chart.
width: The width of axis which is usually calculated internally.
Expand Down
Loading