From 7ba61ced145c8b764a5bed36001aacfdd8993a85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Brand=C3=A9ho?= <thomas.brandeho@gmail.com>
Date: Thu, 11 Jul 2024 19:35:34 +0200
Subject: [PATCH] Make domain props work for `y_axis` (#3652)

---
 reflex/components/recharts/cartesian.py  | 3 +++
 reflex/components/recharts/cartesian.pyi | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/reflex/components/recharts/cartesian.py b/reflex/components/recharts/cartesian.py
index 248ba6930..e7f5367e8 100644
--- a/reflex/components/recharts/cartesian.py
+++ b/reflex/components/recharts/cartesian.py
@@ -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."""
diff --git a/reflex/components/recharts/cartesian.pyi b/reflex/components/recharts/cartesian.pyi
index c89610631..ef8ff1a4d 100644
--- a/reflex/components/recharts/cartesian.pyi
+++ b/reflex/components/recharts/cartesian.pyi
@@ -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,
@@ -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.