Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default props comment for Legend #4100

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading