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 ResponsiveContainer #4099

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 @@ -30,21 +30,24 @@ class ResponsiveContainer(Recharts, MemoizationLeaf):
# The aspect ratio of the container. The final aspect ratio of the SVG element will be (width / height) * aspect. Number
aspect: Var[int]

# The width of chart container. Can be a number or string
# The width of chart container. Can be a number or string. Default: "100%"
width: Var[Union[int, str]]

# The height of chart container. Number
# The height of chart container. Can be a number or string. Default: "100%"
height: Var[Union[int, str]]

# The minimum width of chart container.
# The minimum width of chart container. Number
min_width: Var[int]

# The minimum height of chart container. Number
min_height: Var[int]

# If specified a positive number, debounced function will be used to handle the resize event.
# If specified a positive number, debounced function will be used to handle the resize event. Default: 0
debounce: Var[int]

# If specified provides a callback providing the updated chart width and height values.
on_resize: EventHandler[lambda: []]

# Valid children components
_valid_children: List[str] = [
"AreaChart",
Expand Down
9 changes: 5 additions & 4 deletions reflex/components/recharts/general.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class ResponsiveContainer(Recharts, MemoizationLeaf):
on_mouse_up: Optional[
Union[EventHandler, EventSpec, list, Callable, Var]
] = None,
on_resize: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
on_unmount: Optional[
Union[EventHandler, EventSpec, list, Callable, Var]
Expand All @@ -75,11 +76,11 @@ class ResponsiveContainer(Recharts, MemoizationLeaf):
Args:
*children: The children of the component.
aspect: The aspect ratio of the container. The final aspect ratio of the SVG element will be (width / height) * aspect. Number
width: The width of chart container. Can be a number or string
height: The height of chart container. Number
min_width: The minimum width of chart container.
width: The width of chart container. Can be a number or string. Default: "100%"
height: The height of chart container. Can be a number or string. Default: "100%"
min_width: The minimum width of chart container. Number
min_height: The minimum height of chart container. Number
debounce: If specified a positive number, debounced function will be used to handle the resize event.
debounce: If specified a positive number, debounced function will be used to handle the resize event. Default: 0
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
Expand Down
Loading