Skip to content

Commit 911c2af

Browse files
authored
#3752 bugfix add domain for XAxis (#3764)
1 parent 1a3a6f4 commit 911c2af

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

reflex/components/recharts/cartesian.py

+3
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ class XAxis(Axis):
138138
# Ensures that all datapoints within a chart contribute to its domain calculation, even when they are hidden
139139
include_hidden: Var[bool] = Var.create_safe(False)
140140

141+
# The range of the axis. Work best in conjuction with allow_data_overflow.
142+
domain: Var[List]
143+
141144

142145
class YAxis(Axis):
143146
"""A YAxis component in Recharts."""

reflex/components/recharts/cartesian.pyi

+2
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ class XAxis(Axis):
192192
] = None,
193193
x_axis_id: Optional[Union[Var[Union[int, str]], str, int]] = None,
194194
include_hidden: Optional[Union[Var[bool], bool]] = None,
195+
domain: Optional[Union[Var[List], List]] = None,
195196
data_key: Optional[Union[Var[Union[int, str]], str, int]] = None,
196197
hide: Optional[Union[Var[bool], bool]] = None,
197198
width: Optional[Union[Var[Union[int, str]], str, int]] = None,
@@ -320,6 +321,7 @@ class XAxis(Axis):
320321
orientation: The orientation of axis 'top' | 'bottom'
321322
x_axis_id: The id of x-axis which is corresponding to the data.
322323
include_hidden: Ensures that all datapoints within a chart contribute to its domain calculation, even when they are hidden
324+
domain: The range of the axis. Work best in conjuction with allow_data_overflow.
323325
data_key: The key of data displayed in the axis.
324326
hide: If set true, the axis do not display in the chart.
325327
width: The width of axis which is usually calculated internally.

0 commit comments

Comments
 (0)