1
0
Эх сурвалжийг харах

default props comment for Legend (#4100)

Carlos 7 сар өмнө
parent
commit
e633cd0385

+ 7 - 4
reflex/components/recharts/general.py

@@ -73,21 +73,24 @@ class Legend(Recharts):
     # The height of legend container. Number
     height: Var[int]
 
-    # The layout of legend items. 'horizontal' | 'vertical'
+    # The layout of legend items. 'horizontal' | 'vertical'. Default: "horizontal"
     layout: Var[LiteralLayout]
 
-    # The alignment of legend items in 'horizontal' direction, which can be 'left', 'center', 'right'.
+    # The alignment of legend items in 'horizontal' direction, which can be 'left', 'center', 'right'. Default: "center"
     align: Var[LiteralLegendAlign]
 
-    # The alignment of legend items in 'vertical' direction, which can be 'top', 'middle', 'bottom'.
+    # The alignment of legend items in 'vertical' direction, which can be 'top', 'middle', 'bottom'. Default: "bottom"
     vertical_align: Var[LiteralVerticalAlign]
 
-    # The size of icon in each legend item.
+    # The size of icon in each legend item. Default: 14
     icon_size: Var[int]
 
     # The type of icon in each legend item. 'line' | 'plainline' | 'square' | 'rect' | 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye'
     icon_type: Var[LiteralIconType]
 
+    # The source data of the content to be displayed in the legend, usually calculated internally. Default: []
+    payload: Var[List[Dict[str, Any]]]
+
     # The width of chart container, usually calculated internally.
     chart_width: Var[int]
 

+ 9 - 5
reflex/components/recharts/general.pyi

@@ -3,7 +3,7 @@
 # ------------------- DO NOT EDIT ----------------------
 # This file was generated by `reflex/utils/pyi_generator.py`!
 # ------------------------------------------------------
-from typing import Any, Callable, Dict, Literal, Optional, Union, overload
+from typing import Any, Callable, Dict, List, Literal, Optional, Union, overload
 
 from reflex.components.component import MemoizationLeaf
 from reflex.constants.colors import Color
@@ -150,6 +150,9 @@ class Legend(Recharts):
                 ],
             ]
         ] = None,
+        payload: Optional[
+            Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]
+        ] = None,
         chart_width: Optional[Union[Var[int], int]] = None,
         chart_height: Optional[Union[Var[int], int]] = None,
         margin: Optional[Union[Dict[str, Any], Var[Dict[str, Any]]]] = None,
@@ -202,11 +205,12 @@ class Legend(Recharts):
             *children: The children of the component.
             width: The width of legend container. Number
             height: The height of legend container. Number
-            layout: The layout of legend items. 'horizontal' | 'vertical'
-            align: The alignment of legend items in 'horizontal' direction, which can be 'left', 'center', 'right'.
-            vertical_align: The alignment of legend items in 'vertical' direction, which can be 'top', 'middle', 'bottom'.
-            icon_size: The size of icon in each legend item.
+            layout: The layout of legend items. 'horizontal' | 'vertical'. Default: "horizontal"
+            align: The alignment of legend items in 'horizontal' direction, which can be 'left', 'center', 'right'. Default: "center"
+            vertical_align: The alignment of legend items in 'vertical' direction, which can be 'top', 'middle', 'bottom'. Default: "bottom"
+            icon_size: The size of icon in each legend item. Default: 14
             icon_type: The type of icon in each legend item. 'line' | 'plainline' | 'square' | 'rect' | 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye'
+            payload: The source data of the content to be displayed in the legend, usually calculated internally. Default: []
             chart_width: The width of chart container, usually calculated internally.
             chart_height: The height of chart container, usually calculated internally.
             margin: The margin of chart container, usually calculated internally.