Skip to content

Commit

Permalink
default props comment for Legend (#4100)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosabadia authored Oct 8, 2024
1 parent 9c7de9b commit e633cd0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
11 changes: 7 additions & 4 deletions reflex/components/recharts/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
14 changes: 9 additions & 5 deletions reflex/components/recharts/general.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit e633cd0

Please sign in to comment.