From 01870e3d4d411e9b30fd03d435691ced356392ca Mon Sep 17 00:00:00 2001 From: carlosabadia Date: Tue, 8 Oct 2024 11:04:31 +0200 Subject: [PATCH] default props comment for ResponsiveContainer --- reflex/components/recharts/general.py | 11 +++++++---- reflex/components/recharts/general.pyi | 9 +++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/reflex/components/recharts/general.py b/reflex/components/recharts/general.py index cc252de57d..fbc632864a 100644 --- a/reflex/components/recharts/general.py +++ b/reflex/components/recharts/general.py @@ -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", diff --git a/reflex/components/recharts/general.pyi b/reflex/components/recharts/general.pyi index 0e21c8b857..5e2dae7595 100644 --- a/reflex/components/recharts/general.pyi +++ b/reflex/components/recharts/general.pyi @@ -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] @@ -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.