瀏覽代碼

default props comment for Reference (#4121)

Carlos 7 月之前
父節點
當前提交
c244418aaa
共有 2 個文件被更改,包括 16 次插入16 次删除
  1. 4 4
      reflex/components/recharts/cartesian.py
  2. 12 12
      reflex/components/recharts/cartesian.pyi

+ 4 - 4
reflex/components/recharts/cartesian.py

@@ -612,19 +612,19 @@ class ErrorBar(Recharts):
 class Reference(Recharts):
 class Reference(Recharts):
     """A base class for reference components in Reference."""
     """A base class for reference components in Reference."""
 
 
-    # The id of x-axis which is corresponding to the data.
+    # The id of x-axis which is corresponding to the data. Default: 0
     x_axis_id: Var[Union[str, int]]
     x_axis_id: Var[Union[str, int]]
 
 
-    # The id of y-axis which is corresponding to the data.
+    # The id of y-axis which is corresponding to the data. Default: 0
     y_axis_id: Var[Union[str, int]]
     y_axis_id: Var[Union[str, int]]
 
 
-    # Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas.
+    # Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas. Default: "discard"
     if_overflow: Var[LiteralIfOverflow]
     if_overflow: Var[LiteralIfOverflow]
 
 
     # If set a string or a number, default label will be drawn, and the option is content.
     # If set a string or a number, default label will be drawn, and the option is content.
     label: Var[Union[str, int]]
     label: Var[Union[str, int]]
 
 
-    # If set true, the line will be rendered in front of bars in BarChart, etc.
+    # If set true, the line will be rendered in front of bars in BarChart, etc. Default: False
     is_front: Var[bool]
     is_front: Var[bool]
 
 
 
 

+ 12 - 12
reflex/components/recharts/cartesian.pyi

@@ -1697,11 +1697,11 @@ class Reference(Recharts):
 
 
         Args:
         Args:
             *children: The children of the component.
             *children: The children of the component.
-            x_axis_id: The id of x-axis which is corresponding to the data.
-            y_axis_id: The id of y-axis which is corresponding to the data.
-            if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas.
+            x_axis_id: The id of x-axis which is corresponding to the data. Default: 0
+            y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
+            if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas. Default: "discard"
             label: If set a string or a number, default label will be drawn, and the option is content.
             label: If set a string or a number, default label will be drawn, and the option is content.
-            is_front: If set true, the line will be rendered in front of bars in BarChart, etc.
+            is_front: If set true, the line will be rendered in front of bars in BarChart, etc. Default: False
             style: The style of the component.
             style: The style of the component.
             key: A unique key for the component.
             key: A unique key for the component.
             id: The id for the component.
             id: The id for the component.
@@ -1788,11 +1788,11 @@ class ReferenceLine(Reference):
             stroke: The color of the reference line.
             stroke: The color of the reference line.
             stroke_width: The width of the stroke. Default: 1
             stroke_width: The width of the stroke. Default: 1
             segment: Array of endpoints in { x, y } format. These endpoints would be used to draw the ReferenceLine.
             segment: Array of endpoints in { x, y } format. These endpoints would be used to draw the ReferenceLine.
-            x_axis_id: The id of x-axis which is corresponding to the data.
-            y_axis_id: The id of y-axis which is corresponding to the data.
-            if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas.
+            x_axis_id: The id of x-axis which is corresponding to the data. Default: 0
+            y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
+            if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas. Default: "discard"
             label: If set a string or a number, default label will be drawn, and the option is content.
             label: If set a string or a number, default label will be drawn, and the option is content.
-            is_front: If set true, the line will be rendered in front of bars in BarChart, etc.
+            is_front: If set true, the line will be rendered in front of bars in BarChart, etc. Default: False
             style: The style of the component.
             style: The style of the component.
             key: A unique key for the component.
             key: A unique key for the component.
             id: The id for the component.
             id: The id for the component.
@@ -1879,11 +1879,11 @@ class ReferenceDot(Reference):
             r: The radius of dot.
             r: The radius of dot.
             fill: The color of the area fill.
             fill: The color of the area fill.
             stroke: The color of the line stroke.
             stroke: The color of the line stroke.
-            x_axis_id: The id of x-axis which is corresponding to the data.
-            y_axis_id: The id of y-axis which is corresponding to the data.
-            if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas.
+            x_axis_id: The id of x-axis which is corresponding to the data. Default: 0
+            y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
+            if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas. Default: "discard"
             label: If set a string or a number, default label will be drawn, and the option is content.
             label: If set a string or a number, default label will be drawn, and the option is content.
-            is_front: If set true, the line will be rendered in front of bars in BarChart, etc.
+            is_front: If set true, the line will be rendered in front of bars in BarChart, etc. Default: False
             style: The style of the component.
             style: The style of the component.
             key: A unique key for the component.
             key: A unique key for the component.
             id: The id for the component.
             id: The id for the component.