reflex 0.5.4a2__py3-none-any.whl → 0.5.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of reflex might be problematic. Click here for more details.
- reflex/.templates/apps/demo/code/demo.py +1 -0
- reflex/.templates/apps/demo/code/pages/__init__.py +1 -0
- reflex/.templates/apps/demo/code/pages/datatable.py +1 -0
- reflex/.templates/apps/demo/code/pages/forms.py +1 -0
- reflex/.templates/apps/demo/code/pages/graphing.py +1 -0
- reflex/.templates/apps/demo/code/pages/home.py +1 -0
- reflex/.templates/apps/demo/code/styles.py +1 -0
- reflex/.templates/apps/demo/code/webui/components/loading_icon.py +1 -8
- reflex/.templates/web/components/reflex/chakra_color_mode_provider.js +27 -12
- reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +19 -5
- reflex/.templates/web/utils/state.js +73 -7
- reflex/__init__.py +3 -0
- reflex/__init__.pyi +3 -0
- reflex/admin.py +1 -0
- reflex/app.py +8 -6
- reflex/app_module_for_backend.py +2 -1
- reflex/base.py +4 -4
- reflex/compiler/compiler.py +4 -3
- reflex/compiler/templates.py +2 -0
- reflex/compiler/utils.py +58 -35
- reflex/components/__init__.py +1 -0
- reflex/components/base/__init__.py +1 -0
- reflex/components/base/app_wrap.py +1 -0
- reflex/components/base/fragment.py +1 -0
- reflex/components/base/link.py +0 -1
- reflex/components/base/script.py +11 -15
- reflex/components/base/script.pyi +1 -2
- reflex/components/chakra/base.py +15 -13
- reflex/components/chakra/base.pyi +3 -1
- reflex/components/chakra/datadisplay/code.py +1 -0
- reflex/components/chakra/datadisplay/divider.py +1 -0
- reflex/components/chakra/datadisplay/table.py +1 -0
- reflex/components/chakra/datadisplay/table.pyi +3 -0
- reflex/components/chakra/datadisplay/tag.py +1 -0
- reflex/components/chakra/disclosure/transition.py +1 -0
- reflex/components/chakra/feedback/circularprogress.py +1 -0
- reflex/components/chakra/forms/button.py +1 -0
- reflex/components/chakra/forms/checkbox.py +4 -13
- reflex/components/chakra/forms/checkbox.pyi +1 -3
- reflex/components/chakra/forms/colormodeswitch.py +1 -0
- reflex/components/chakra/forms/editable.py +13 -16
- reflex/components/chakra/forms/editable.pyi +1 -3
- reflex/components/chakra/forms/form.py +1 -0
- reflex/components/chakra/forms/input.py +22 -21
- reflex/components/chakra/forms/input.pyi +4 -4
- reflex/components/chakra/forms/multiselect.py +1 -0
- reflex/components/chakra/forms/numberinput.py +3 -12
- reflex/components/chakra/forms/numberinput.pyi +1 -3
- reflex/components/chakra/forms/pininput.py +8 -14
- reflex/components/chakra/forms/pininput.pyi +2 -3
- reflex/components/chakra/forms/radio.py +4 -13
- reflex/components/chakra/forms/radio.pyi +2 -3
- reflex/components/chakra/forms/rangeslider.py +10 -13
- reflex/components/chakra/forms/rangeslider.pyi +2 -3
- reflex/components/chakra/forms/select.py +4 -12
- reflex/components/chakra/forms/select.pyi +2 -3
- reflex/components/chakra/forms/slider.py +10 -13
- reflex/components/chakra/forms/slider.pyi +2 -3
- reflex/components/chakra/forms/switch.py +4 -13
- reflex/components/chakra/forms/switch.pyi +1 -3
- reflex/components/chakra/forms/textarea.py +16 -17
- reflex/components/chakra/forms/textarea.pyi +1 -3
- reflex/components/chakra/media/avatar.py +4 -12
- reflex/components/chakra/media/avatar.pyi +1 -2
- reflex/components/chakra/media/icon.py +1 -0
- reflex/components/chakra/media/image.py +7 -11
- reflex/components/chakra/media/image.pyi +2 -2
- reflex/components/chakra/navigation/link.py +8 -4
- reflex/components/chakra/navigation/link.pyi +2 -1
- reflex/components/chakra/overlay/alertdialog.py +12 -14
- reflex/components/chakra/overlay/alertdialog.pyi +1 -2
- reflex/components/chakra/overlay/drawer.py +12 -14
- reflex/components/chakra/overlay/drawer.pyi +1 -2
- reflex/components/chakra/overlay/menu.py +7 -11
- reflex/components/chakra/overlay/menu.pyi +2 -2
- reflex/components/chakra/overlay/modal.py +13 -13
- reflex/components/chakra/overlay/modal.pyi +2 -2
- reflex/components/chakra/overlay/popover.py +6 -12
- reflex/components/chakra/overlay/popover.pyi +1 -2
- reflex/components/chakra/overlay/tooltip.py +7 -13
- reflex/components/chakra/overlay/tooltip.pyi +1 -2
- reflex/components/chakra/typography/heading.py +0 -1
- reflex/components/chakra/typography/span.py +1 -0
- reflex/components/chakra/typography/text.py +1 -0
- reflex/components/component.py +70 -43
- reflex/components/core/__init__.py +1 -0
- reflex/components/core/banner.py +27 -24
- reflex/components/core/banner.pyi +6 -2
- reflex/components/core/client_side_routing.py +1 -0
- reflex/components/core/cond.py +19 -17
- reflex/components/core/debounce.py +4 -11
- reflex/components/core/debounce.pyi +1 -1
- reflex/components/core/foreach.py +1 -0
- reflex/components/core/html.py +1 -0
- reflex/components/core/match.py +9 -6
- reflex/components/core/upload.py +26 -25
- reflex/components/core/upload.pyi +3 -4
- reflex/components/datadisplay/__init__.py +1 -0
- reflex/components/datadisplay/code.py +27 -23
- reflex/components/datadisplay/code.pyi +4 -2
- reflex/components/datadisplay/dataeditor.py +73 -80
- reflex/components/datadisplay/dataeditor.pyi +52 -4
- reflex/components/datadisplay/logo.py +1 -0
- reflex/components/el/__init__.py +1 -0
- reflex/components/el/__init__.pyi +8 -0
- reflex/components/el/element.py +0 -1
- reflex/components/el/elements/__init__.py +5 -0
- reflex/components/el/elements/__init__.pyi +12 -1
- reflex/components/el/elements/base.py +1 -0
- reflex/components/el/elements/forms.py +44 -61
- reflex/components/el/elements/forms.pyi +4 -6
- reflex/components/el/elements/inline.py +1 -0
- reflex/components/el/elements/media.py +53 -0
- reflex/components/el/elements/media.pyi +428 -0
- reflex/components/el/elements/metadata.py +11 -0
- reflex/components/el/elements/metadata.pyi +80 -0
- reflex/components/el/elements/other.py +1 -0
- reflex/components/el/elements/scripts.py +1 -0
- reflex/components/el/elements/tables.py +1 -0
- reflex/components/el/elements/typography.py +1 -0
- reflex/components/gridjs/datatable.py +9 -6
- reflex/components/gridjs/datatable.pyi +4 -1
- reflex/components/markdown/markdown.py +36 -41
- reflex/components/markdown/markdown.pyi +4 -3
- reflex/components/media/icon.py +1 -0
- reflex/components/moment/moment.py +11 -17
- reflex/components/moment/moment.pyi +4 -3
- reflex/components/next/base.py +1 -0
- reflex/components/next/image.py +6 -11
- reflex/components/next/image.pyi +2 -2
- reflex/components/plotly/plotly.py +1 -0
- reflex/components/props.py +1 -0
- reflex/components/radix/__init__.py +1 -0
- reflex/components/radix/primitives/__init__.py +1 -0
- reflex/components/radix/primitives/accordion.py +7 -15
- reflex/components/radix/primitives/accordion.pyi +7 -4
- reflex/components/radix/primitives/base.py +1 -0
- reflex/components/radix/primitives/drawer.py +17 -27
- reflex/components/radix/primitives/drawer.pyi +2 -4
- reflex/components/radix/primitives/form.py +4 -12
- reflex/components/radix/primitives/form.pyi +2 -3
- reflex/components/radix/primitives/slider.py +6 -11
- reflex/components/radix/primitives/slider.pyi +2 -2
- reflex/components/radix/themes/__init__.py +1 -0
- reflex/components/radix/themes/base.py +3 -3
- reflex/components/radix/themes/base.pyi +3 -2
- reflex/components/radix/themes/color_mode.py +31 -2
- reflex/components/radix/themes/color_mode.pyi +10 -1
- reflex/components/radix/themes/components/__init__.py +1 -0
- reflex/components/radix/themes/components/alert_dialog.py +13 -24
- reflex/components/radix/themes/components/alert_dialog.pyi +2 -4
- reflex/components/radix/themes/components/aspect_ratio.py +1 -0
- reflex/components/radix/themes/components/card.py +1 -0
- reflex/components/radix/themes/components/checkbox.py +6 -22
- reflex/components/radix/themes/components/checkbox.pyi +2 -4
- reflex/components/radix/themes/components/checkbox_group.py +15 -3
- reflex/components/radix/themes/components/checkbox_group.pyi +10 -2
- reflex/components/radix/themes/components/context_menu.py +29 -38
- reflex/components/radix/themes/components/context_menu.pyi +2 -5
- reflex/components/radix/themes/components/dialog.py +18 -26
- reflex/components/radix/themes/components/dialog.pyi +2 -4
- reflex/components/radix/themes/components/dropdown_menu.py +32 -57
- reflex/components/radix/themes/components/dropdown_menu.pyi +2 -7
- reflex/components/radix/themes/components/hover_card.py +5 -12
- reflex/components/radix/themes/components/hover_card.pyi +2 -3
- reflex/components/radix/themes/components/icon_button.py +1 -0
- reflex/components/radix/themes/components/icon_button.pyi +1 -0
- reflex/components/radix/themes/components/inset.py +1 -0
- reflex/components/radix/themes/components/popover.py +22 -27
- reflex/components/radix/themes/components/popover.pyi +2 -4
- reflex/components/radix/themes/components/radio_group.py +25 -17
- reflex/components/radix/themes/components/radio_group.pyi +2 -3
- reflex/components/radix/themes/components/scroll_area.py +1 -0
- reflex/components/radix/themes/components/segmented_control.py +18 -5
- reflex/components/radix/themes/components/segmented_control.pyi +16 -7
- reflex/components/radix/themes/components/select.py +13 -23
- reflex/components/radix/themes/components/select.pyi +1 -4
- reflex/components/radix/themes/components/separator.py +1 -0
- reflex/components/radix/themes/components/slider.py +7 -12
- reflex/components/radix/themes/components/slider.pyi +2 -3
- reflex/components/radix/themes/components/switch.py +5 -12
- reflex/components/radix/themes/components/switch.pyi +2 -3
- reflex/components/radix/themes/components/table.py +1 -0
- reflex/components/radix/themes/components/tabs.py +4 -11
- reflex/components/radix/themes/components/tabs.pyi +2 -2
- reflex/components/radix/themes/components/text_area.py +19 -18
- reflex/components/radix/themes/components/text_area.pyi +2 -3
- reflex/components/radix/themes/components/text_field.py +19 -18
- reflex/components/radix/themes/components/text_field.pyi +3 -3
- reflex/components/radix/themes/components/tooltip.py +10 -13
- reflex/components/radix/themes/components/tooltip.pyi +2 -3
- reflex/components/radix/themes/layout/__init__.py +1 -0
- reflex/components/radix/themes/layout/box.py +1 -0
- reflex/components/radix/themes/layout/container.py +1 -0
- reflex/components/radix/themes/layout/list.py +1 -0
- reflex/components/radix/themes/layout/list.pyi +1 -0
- reflex/components/radix/themes/layout/section.py +1 -0
- reflex/components/radix/themes/typography/__init__.py +1 -0
- reflex/components/radix/themes/typography/base.py +1 -0
- reflex/components/radix/themes/typography/blockquote.py +1 -0
- reflex/components/radix/themes/typography/code.py +1 -0
- reflex/components/radix/themes/typography/heading.py +1 -0
- reflex/components/radix/themes/typography/link.py +8 -3
- reflex/components/radix/themes/typography/link.pyi +2 -1
- reflex/components/react_player/audio.py +1 -0
- reflex/components/react_player/audio.pyi +48 -0
- reflex/components/react_player/react_player.py +49 -0
- reflex/components/react_player/react_player.pyi +49 -0
- reflex/components/react_player/video.py +1 -0
- reflex/components/react_player/video.pyi +48 -0
- reflex/components/recharts/__init__.py +1 -0
- reflex/components/recharts/cartesian.py +264 -74
- reflex/components/recharts/cartesian.pyi +573 -58
- reflex/components/recharts/charts.py +68 -78
- reflex/components/recharts/charts.pyi +373 -156
- reflex/components/recharts/general.py +52 -20
- reflex/components/recharts/general.pyi +52 -6
- reflex/components/recharts/polar.py +30 -18
- reflex/components/recharts/polar.pyi +66 -5
- reflex/components/recharts/recharts.py +5 -3
- reflex/components/recharts/recharts.pyi +2 -1
- reflex/components/sonner/toast.py +2 -2
- reflex/components/sonner/toast.pyi +1 -1
- reflex/components/suneditor/editor.py +39 -26
- reflex/components/suneditor/editor.pyi +4 -4
- reflex/components/tags/iter_tag.py +1 -0
- reflex/constants/__init__.py +3 -2
- reflex/constants/base.py +20 -21
- reflex/constants/compiler.py +3 -1
- reflex/constants/config.py +1 -0
- reflex/constants/event.py +1 -0
- reflex/constants/installer.py +3 -2
- reflex/constants/style.py +2 -8
- reflex/event.py +36 -6
- reflex/experimental/assets.py +1 -0
- reflex/experimental/client_state.py +9 -3
- reflex/experimental/hooks.py +1 -0
- reflex/experimental/misc.py +12 -3
- reflex/middleware/hydrate_middleware.py +1 -0
- reflex/middleware/middleware.py +1 -0
- reflex/state.py +38 -1
- reflex/style.py +67 -20
- reflex/testing.py +6 -2
- reflex/utils/build.py +76 -72
- reflex/utils/compat.py +5 -0
- reflex/utils/exec.py +17 -9
- reflex/utils/export.py +13 -9
- reflex/utils/imports.py +34 -5
- reflex/utils/lazy_loader.py +1 -0
- reflex/utils/path_ops.py +39 -33
- reflex/utils/prerequisites.py +38 -29
- reflex/utils/processes.py +1 -1
- reflex/utils/serializers.py +3 -6
- reflex/utils/watch.py +3 -1
- reflex/vars.py +26 -10
- reflex/vars.pyi +3 -3
- {reflex-0.5.4a2.dist-info → reflex-0.5.5.dist-info}/METADATA +3 -3
- {reflex-0.5.4a2.dist-info → reflex-0.5.5.dist-info}/RECORD +261 -261
- {reflex-0.5.4a2.dist-info → reflex-0.5.5.dist-info}/LICENSE +0 -0
- {reflex-0.5.4a2.dist-info → reflex-0.5.5.dist-info}/WHEEL +0 -0
- {reflex-0.5.4a2.dist-info → reflex-0.5.5.dist-info}/entry_points.txt +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""A module that defines the chart components in Recharts."""
|
|
2
|
+
|
|
2
3
|
from __future__ import annotations
|
|
3
4
|
|
|
4
5
|
from typing import Any, Dict, List, Union
|
|
@@ -22,42 +23,23 @@ from .recharts import (
|
|
|
22
23
|
class ChartBase(RechartsCharts):
|
|
23
24
|
"""A component that wraps a Recharts charts."""
|
|
24
25
|
|
|
25
|
-
# The source data, in which each element is an object.
|
|
26
|
-
data: Var[List[Dict[str, Any]]]
|
|
27
|
-
|
|
28
|
-
# If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush.
|
|
29
|
-
sync_id: Var[str]
|
|
30
|
-
|
|
31
|
-
# When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
|
|
32
|
-
sync_method: Var[LiteralSyncMethod]
|
|
33
|
-
|
|
34
26
|
# The width of chart container. String or Integer
|
|
35
27
|
width: Var[Union[str, int]] = "100%" # type: ignore
|
|
36
28
|
|
|
37
29
|
# The height of chart container.
|
|
38
30
|
height: Var[Union[str, int]] = "100%" # type: ignore
|
|
39
31
|
|
|
40
|
-
# The
|
|
41
|
-
|
|
32
|
+
# The customized event handler of click on the component in this chart
|
|
33
|
+
on_click: EventHandler[lambda: []]
|
|
42
34
|
|
|
43
|
-
# The
|
|
44
|
-
|
|
35
|
+
# The customized event handler of mouseenter on the component in this chart
|
|
36
|
+
on_mouse_enter: EventHandler[lambda: []]
|
|
45
37
|
|
|
46
|
-
# The
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
def get_event_triggers(self) -> dict[str, Union[Var, Any]]:
|
|
50
|
-
"""Get the event triggers that pass the component's value to the handler.
|
|
38
|
+
# The customized event handler of mousemove on the component in this chart
|
|
39
|
+
on_mouse_move: EventHandler[lambda: []]
|
|
51
40
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"""
|
|
55
|
-
return {
|
|
56
|
-
EventTriggers.ON_CLICK: lambda: [],
|
|
57
|
-
EventTriggers.ON_MOUSE_ENTER: lambda: [],
|
|
58
|
-
EventTriggers.ON_MOUSE_MOVE: lambda: [],
|
|
59
|
-
EventTriggers.ON_MOUSE_LEAVE: lambda: [],
|
|
60
|
-
}
|
|
41
|
+
# The customized event handler of mouseleave on the component in this chart
|
|
42
|
+
on_mouse_leave: EventHandler[lambda: []]
|
|
61
43
|
|
|
62
44
|
@staticmethod
|
|
63
45
|
def _ensure_valid_dimension(name: str, value: Any) -> None:
|
|
@@ -117,7 +99,29 @@ class ChartBase(RechartsCharts):
|
|
|
117
99
|
)
|
|
118
100
|
|
|
119
101
|
|
|
120
|
-
class
|
|
102
|
+
class CategoricalChartBase(ChartBase):
|
|
103
|
+
"""A component that wraps a Categorical Recharts charts."""
|
|
104
|
+
|
|
105
|
+
# The source data, in which each element is an object.
|
|
106
|
+
data: Var[List[Dict[str, Any]]]
|
|
107
|
+
|
|
108
|
+
# The sizes of whitespace around the chart.
|
|
109
|
+
margin: Var[Dict[str, Any]]
|
|
110
|
+
|
|
111
|
+
# If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush.
|
|
112
|
+
sync_id: Var[str]
|
|
113
|
+
|
|
114
|
+
# When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
|
|
115
|
+
sync_method: Var[LiteralSyncMethod]
|
|
116
|
+
|
|
117
|
+
# The layout of area in the chart. 'horizontal' | 'vertical'
|
|
118
|
+
layout: Var[LiteralLayout]
|
|
119
|
+
|
|
120
|
+
# The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. 'expand' | 'none' | 'wiggle' | 'silhouette'
|
|
121
|
+
stack_offset: Var[LiteralStackOffset]
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class AreaChart(CategoricalChartBase):
|
|
121
125
|
"""An Area chart component in Recharts."""
|
|
122
126
|
|
|
123
127
|
tag = "AreaChart"
|
|
@@ -139,10 +143,11 @@ class AreaChart(ChartBase):
|
|
|
139
143
|
"Legend",
|
|
140
144
|
"GraphingTooltip",
|
|
141
145
|
"Area",
|
|
146
|
+
"Defs",
|
|
142
147
|
]
|
|
143
148
|
|
|
144
149
|
|
|
145
|
-
class BarChart(
|
|
150
|
+
class BarChart(CategoricalChartBase):
|
|
146
151
|
"""A Bar chart component in Recharts."""
|
|
147
152
|
|
|
148
153
|
tag = "BarChart"
|
|
@@ -182,7 +187,7 @@ class BarChart(ChartBase):
|
|
|
182
187
|
]
|
|
183
188
|
|
|
184
189
|
|
|
185
|
-
class LineChart(
|
|
190
|
+
class LineChart(CategoricalChartBase):
|
|
186
191
|
"""A Line chart component in Recharts."""
|
|
187
192
|
|
|
188
193
|
tag = "LineChart"
|
|
@@ -204,7 +209,7 @@ class LineChart(ChartBase):
|
|
|
204
209
|
]
|
|
205
210
|
|
|
206
211
|
|
|
207
|
-
class ComposedChart(
|
|
212
|
+
class ComposedChart(CategoricalChartBase):
|
|
208
213
|
"""A Composed chart component in Recharts."""
|
|
209
214
|
|
|
210
215
|
tag = "ComposedChart"
|
|
@@ -218,7 +223,7 @@ class ComposedChart(ChartBase):
|
|
|
218
223
|
bar_category_gap: Var[Union[str, int]] # type: ignore
|
|
219
224
|
|
|
220
225
|
# The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number
|
|
221
|
-
bar_gap: Var[int]
|
|
226
|
+
bar_gap: Var[Union[str, int]] # type: ignore
|
|
222
227
|
|
|
223
228
|
# The width of all the bars in the chart. Number
|
|
224
229
|
bar_size: Var[int]
|
|
@@ -250,6 +255,9 @@ class PieChart(ChartBase):
|
|
|
250
255
|
|
|
251
256
|
alias = "RechartsPieChart"
|
|
252
257
|
|
|
258
|
+
# The sizes of whitespace around the chart.
|
|
259
|
+
margin: Var[Dict[str, Any]]
|
|
260
|
+
|
|
253
261
|
# Valid children components
|
|
254
262
|
_valid_children: List[str] = [
|
|
255
263
|
"PolarAngleAxis",
|
|
@@ -260,17 +268,17 @@ class PieChart(ChartBase):
|
|
|
260
268
|
"Pie",
|
|
261
269
|
]
|
|
262
270
|
|
|
263
|
-
|
|
264
|
-
|
|
271
|
+
# The customized event handler of mousedown on the sectors in this group
|
|
272
|
+
on_mouse_down: EventHandler[lambda: []]
|
|
265
273
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
+
# The customized event handler of mouseup on the sectors in this group
|
|
275
|
+
on_mouse_up: EventHandler[lambda: []]
|
|
276
|
+
|
|
277
|
+
# The customized event handler of mouseover on the sectors in this group
|
|
278
|
+
on_mouse_over: EventHandler[lambda: []]
|
|
279
|
+
|
|
280
|
+
# The customized event handler of mouseout on the sectors in this group
|
|
281
|
+
on_mouse_out: EventHandler[lambda: []]
|
|
274
282
|
|
|
275
283
|
|
|
276
284
|
class RadarChart(ChartBase):
|
|
@@ -280,6 +288,12 @@ class RadarChart(ChartBase):
|
|
|
280
288
|
|
|
281
289
|
alias = "RechartsRadarChart"
|
|
282
290
|
|
|
291
|
+
# The source data, in which each element is an object.
|
|
292
|
+
data: Var[List[Dict[str, Any]]]
|
|
293
|
+
|
|
294
|
+
# The sizes of whitespace around the chart.
|
|
295
|
+
margin: Var[Dict[str, Any]]
|
|
296
|
+
|
|
283
297
|
# The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage
|
|
284
298
|
cx: Var[Union[int, str]]
|
|
285
299
|
|
|
@@ -328,6 +342,12 @@ class RadialBarChart(ChartBase):
|
|
|
328
342
|
|
|
329
343
|
alias = "RechartsRadialBarChart"
|
|
330
344
|
|
|
345
|
+
# The source data which each element is an object.
|
|
346
|
+
data: Var[List[Dict[str, Any]]]
|
|
347
|
+
|
|
348
|
+
# The sizes of whitespace around the chart.
|
|
349
|
+
margin: Var[Dict[str, Any]]
|
|
350
|
+
|
|
331
351
|
# The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage
|
|
332
352
|
cx: Var[Union[int, str]]
|
|
333
353
|
|
|
@@ -365,18 +385,6 @@ class RadialBarChart(ChartBase):
|
|
|
365
385
|
"RadialBar",
|
|
366
386
|
]
|
|
367
387
|
|
|
368
|
-
def get_event_triggers(self) -> dict[str, Union[Var, Any]]:
|
|
369
|
-
"""Get the event triggers that pass the component's value to the handler.
|
|
370
|
-
|
|
371
|
-
Returns:
|
|
372
|
-
A dict mapping the event trigger to the var that is passed to the handler.
|
|
373
|
-
"""
|
|
374
|
-
return {
|
|
375
|
-
EventTriggers.ON_CLICK: lambda: [],
|
|
376
|
-
EventTriggers.ON_MOUSE_ENTER: lambda: [],
|
|
377
|
-
EventTriggers.ON_MOUSE_LEAVE: lambda: [],
|
|
378
|
-
}
|
|
379
|
-
|
|
380
388
|
|
|
381
389
|
class ScatterChart(ChartBase):
|
|
382
390
|
"""A Scatter chart component in Recharts."""
|
|
@@ -385,6 +393,9 @@ class ScatterChart(ChartBase):
|
|
|
385
393
|
|
|
386
394
|
alias = "RechartsScatterChart"
|
|
387
395
|
|
|
396
|
+
# The sizes of whitespace around the chart.
|
|
397
|
+
margin: Var[Dict[str, Any]]
|
|
398
|
+
|
|
388
399
|
# Valid children components
|
|
389
400
|
_valid_children: List[str] = [
|
|
390
401
|
"XAxis",
|
|
@@ -418,40 +429,19 @@ class ScatterChart(ChartBase):
|
|
|
418
429
|
}
|
|
419
430
|
|
|
420
431
|
|
|
421
|
-
class FunnelChart(
|
|
432
|
+
class FunnelChart(ChartBase):
|
|
422
433
|
"""A Funnel chart component in Recharts."""
|
|
423
434
|
|
|
424
435
|
tag = "FunnelChart"
|
|
425
436
|
|
|
426
437
|
alias = "RechartsFunnelChart"
|
|
427
438
|
|
|
428
|
-
# The
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
# If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush.
|
|
432
|
-
sync_id: Var[str]
|
|
433
|
-
|
|
434
|
-
# When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
|
|
435
|
-
sync_method: Var[str]
|
|
436
|
-
|
|
437
|
-
# The width of chart container. String or Integer
|
|
438
|
-
width: Var[Union[str, int]] = "100%" # type: ignore
|
|
439
|
-
|
|
440
|
-
# The height of chart container.
|
|
441
|
-
height: Var[Union[str, int]] = "100%" # type: ignore
|
|
442
|
-
|
|
443
|
-
# The layout of area in the chart. 'horizontal' | 'vertical'
|
|
444
|
-
layout: Var[LiteralLayout]
|
|
439
|
+
# The layout of bars in the chart. centeric
|
|
440
|
+
layout: Var[str]
|
|
445
441
|
|
|
446
442
|
# The sizes of whitespace around the chart.
|
|
447
443
|
margin: Var[Dict[str, Any]]
|
|
448
444
|
|
|
449
|
-
# The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. 'expand' | 'none' | 'wiggle' | 'silhouette'
|
|
450
|
-
stack_offset: Var[LiteralStackOffset]
|
|
451
|
-
|
|
452
|
-
# The layout of bars in the chart. centeric
|
|
453
|
-
layout: Var[str]
|
|
454
|
-
|
|
455
445
|
# Valid children components
|
|
456
446
|
_valid_children: List[str] = ["Legend", "GraphingTooltip", "Funnel"]
|
|
457
447
|
|