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,10 +1,12 @@
|
|
|
1
1
|
"""Cartesian charts in Recharts."""
|
|
2
|
+
|
|
2
3
|
from __future__ import annotations
|
|
3
4
|
|
|
4
5
|
from typing import Any, Dict, List, Union
|
|
5
6
|
|
|
6
7
|
from reflex.constants import EventTriggers
|
|
7
8
|
from reflex.constants.colors import Color
|
|
9
|
+
from reflex.event import EventHandler
|
|
8
10
|
from reflex.vars import Var
|
|
9
11
|
|
|
10
12
|
from .recharts import (
|
|
@@ -14,7 +16,9 @@ from .recharts import (
|
|
|
14
16
|
LiteralIfOverflow,
|
|
15
17
|
LiteralInterval,
|
|
16
18
|
LiteralLayout,
|
|
19
|
+
LiteralLegendType,
|
|
17
20
|
LiteralLineType,
|
|
21
|
+
LiteralOrientationLeftRight,
|
|
18
22
|
LiteralOrientationTopBottom,
|
|
19
23
|
LiteralOrientationTopBottomLeftRight,
|
|
20
24
|
LiteralPolarRadiusType,
|
|
@@ -72,22 +76,44 @@ class Axis(Recharts):
|
|
|
72
76
|
# The name of data displayed in the axis. This option will be used to represent an index in a scatter chart.
|
|
73
77
|
name: Var[Union[str, int]]
|
|
74
78
|
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
# Set the values of axis ticks manually.
|
|
80
|
+
ticks: Var[List[Union[str, int]]]
|
|
77
81
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
82
|
+
# If set false, no ticks will be drawn.
|
|
83
|
+
tick: Var[bool]
|
|
84
|
+
|
|
85
|
+
# The count of axis ticks.
|
|
86
|
+
tick_count: Var[int]
|
|
87
|
+
|
|
88
|
+
# If set false, no axis tick lines will be drawn.
|
|
89
|
+
tick_line: Var[bool]
|
|
90
|
+
|
|
91
|
+
# The length of tick line.
|
|
92
|
+
tick_size: Var[int]
|
|
93
|
+
|
|
94
|
+
# The minimum gap between two adjacent labels
|
|
95
|
+
min_tick_gap: Var[int]
|
|
96
|
+
|
|
97
|
+
# The customized event handler of click on the ticks of this axis
|
|
98
|
+
on_click: EventHandler[lambda: []]
|
|
99
|
+
|
|
100
|
+
# The customized event handler of mousedown on the ticks of this axis
|
|
101
|
+
on_mouse_down: EventHandler[lambda: []]
|
|
102
|
+
|
|
103
|
+
# The customized event handler of mouseup on the ticks of this axis
|
|
104
|
+
on_mouse_up: EventHandler[lambda: []]
|
|
105
|
+
|
|
106
|
+
# The customized event handler of mousemove on the ticks of this axis
|
|
107
|
+
on_mouse_move: EventHandler[lambda: []]
|
|
108
|
+
|
|
109
|
+
# The customized event handler of mouseout on the ticks of this axis
|
|
110
|
+
on_mouse_out: EventHandler[lambda: []]
|
|
111
|
+
|
|
112
|
+
# The customized event handler of mouseenter on the ticks of this axis
|
|
113
|
+
on_mouse_enter: EventHandler[lambda: []]
|
|
114
|
+
|
|
115
|
+
# The customized event handler of mouseleave on the ticks of this axis
|
|
116
|
+
on_mouse_leave: EventHandler[lambda: []]
|
|
91
117
|
|
|
92
118
|
|
|
93
119
|
class XAxis(Axis):
|
|
@@ -97,6 +123,9 @@ class XAxis(Axis):
|
|
|
97
123
|
|
|
98
124
|
alias = "RechartsXAxis"
|
|
99
125
|
|
|
126
|
+
# The id of x-axis which is corresponding to the data.
|
|
127
|
+
x_axis_id: Var[Union[str, int]]
|
|
128
|
+
|
|
100
129
|
# Ensures that all datapoints within a chart contribute to its domain calculation, even when they are hidden
|
|
101
130
|
include_hidden: Var[bool] = Var.create_safe(False)
|
|
102
131
|
|
|
@@ -108,9 +137,15 @@ class YAxis(Axis):
|
|
|
108
137
|
|
|
109
138
|
alias = "RechartsYAxis"
|
|
110
139
|
|
|
140
|
+
# The orientation of axis 'left' | 'right'
|
|
141
|
+
orientation: Var[LiteralOrientationLeftRight]
|
|
142
|
+
|
|
111
143
|
# The key of data displayed in the axis.
|
|
112
144
|
data_key: Var[Union[str, int]]
|
|
113
145
|
|
|
146
|
+
# The id of y-axis which is corresponding to the data.
|
|
147
|
+
y_axis_id: Var[Union[str, int]]
|
|
148
|
+
|
|
114
149
|
|
|
115
150
|
class ZAxis(Recharts):
|
|
116
151
|
"""A ZAxis component in Recharts."""
|
|
@@ -202,24 +237,31 @@ class Cartesian(Recharts):
|
|
|
202
237
|
y_axis_id: Var[Union[str, int]]
|
|
203
238
|
|
|
204
239
|
# The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'star' | 'triangle' | 'wye' | 'none'optional
|
|
205
|
-
|
|
240
|
+
legend_type: Var[LiteralLegendType]
|
|
206
241
|
|
|
207
|
-
|
|
208
|
-
|
|
242
|
+
# The customized event handler of click on the component in this group
|
|
243
|
+
on_click: EventHandler[lambda: []]
|
|
209
244
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
245
|
+
# The customized event handler of mousedown on the component in this group
|
|
246
|
+
on_mouse_down: EventHandler[lambda: []]
|
|
247
|
+
|
|
248
|
+
# The customized event handler of mouseup on the component in this group
|
|
249
|
+
on_mouse_up: EventHandler[lambda: []]
|
|
250
|
+
|
|
251
|
+
# The customized event handler of mousemove on the component in this group
|
|
252
|
+
on_mouse_move: EventHandler[lambda: []]
|
|
253
|
+
|
|
254
|
+
# The customized event handler of mouseover on the component in this group
|
|
255
|
+
on_mouse_over: EventHandler[lambda: []]
|
|
256
|
+
|
|
257
|
+
# The customized event handler of mouseout on the component in this group
|
|
258
|
+
on_mouse_out: EventHandler[lambda: []]
|
|
259
|
+
|
|
260
|
+
# The customized event handler of mouseenter on the component in this group
|
|
261
|
+
on_mouse_enter: EventHandler[lambda: []]
|
|
262
|
+
|
|
263
|
+
# The customized event handler of mouseleave on the component in this group
|
|
264
|
+
on_mouse_leave: EventHandler[lambda: []]
|
|
223
265
|
|
|
224
266
|
|
|
225
267
|
class Area(Cartesian):
|
|
@@ -250,8 +292,14 @@ class Area(Cartesian):
|
|
|
250
292
|
# If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally.
|
|
251
293
|
label: Var[bool]
|
|
252
294
|
|
|
253
|
-
# The stack id of area, when two areas have the same value axis and same
|
|
254
|
-
stack_id: Var[str]
|
|
295
|
+
# The stack id of area, when two areas have the same value axis and same stack_id, then the two areas are stacked in order.
|
|
296
|
+
stack_id: Var[Union[str, int]]
|
|
297
|
+
|
|
298
|
+
# The unit of data. This option will be used in tooltip.
|
|
299
|
+
unit: Var[Union[str, int]]
|
|
300
|
+
|
|
301
|
+
# The name of data. This option will be used in tooltip and legend to represent a bar. If no value was set to this option, the value of dataKey will be used alternatively.
|
|
302
|
+
name: Var[Union[str, int]]
|
|
255
303
|
|
|
256
304
|
# Valid children components
|
|
257
305
|
_valid_children: List[str] = ["LabelList"]
|
|
@@ -279,10 +327,19 @@ class Bar(Cartesian):
|
|
|
279
327
|
# If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally.
|
|
280
328
|
label: Var[bool]
|
|
281
329
|
|
|
282
|
-
# The stack id of bar, when two
|
|
330
|
+
# The stack id of bar, when two bars have the same value axis and same stack_id, then the two bars are stacked in order.
|
|
283
331
|
stack_id: Var[str]
|
|
284
332
|
|
|
285
|
-
#
|
|
333
|
+
# The unit of data. This option will be used in tooltip.
|
|
334
|
+
unit: Var[Union[str, int]]
|
|
335
|
+
|
|
336
|
+
# The minimal height of a bar in a horizontal BarChart, or the minimal width of a bar in a vertical BarChart. By default, 0 values are not shown. To visualize a 0 (or close to zero) point, set the minimal point size to a pixel value like 3. In stacked bar charts, minPointSize might not be respected for tightly packed values. So we strongly recommend not using this prop in stacked BarCharts.
|
|
337
|
+
min_point_size: Var[int]
|
|
338
|
+
|
|
339
|
+
# The name of data. This option will be used in tooltip and legend to represent a bar. If no value was set to this option, the value of dataKey will be used alternatively.
|
|
340
|
+
name: Var[Union[str, int]]
|
|
341
|
+
|
|
342
|
+
# Size of the bar (if one bar_size is set then a bar_size must be set for all bars)
|
|
286
343
|
bar_size: Var[int]
|
|
287
344
|
|
|
288
345
|
# Max size of the bar
|
|
@@ -291,6 +348,24 @@ class Bar(Cartesian):
|
|
|
291
348
|
# Valid children components
|
|
292
349
|
_valid_children: List[str] = ["Cell", "LabelList", "ErrorBar"]
|
|
293
350
|
|
|
351
|
+
# If set false, animation of bar will be disabled.
|
|
352
|
+
is_animation_active: Var[bool]
|
|
353
|
+
|
|
354
|
+
# Specifies when the animation should begin, the unit of this option is ms, default 0.
|
|
355
|
+
animation_begin: Var[int]
|
|
356
|
+
|
|
357
|
+
# Specifies the duration of animation, the unit of this option is ms, default 1500.
|
|
358
|
+
animation_duration: Var[int]
|
|
359
|
+
|
|
360
|
+
# The type of easing function, default 'ease'
|
|
361
|
+
animation_easing: Var[LiteralAnimationEasing]
|
|
362
|
+
|
|
363
|
+
# The customized event handler of animation start
|
|
364
|
+
on_animation_begin: EventHandler[lambda: []]
|
|
365
|
+
|
|
366
|
+
# The customized event handler of animation end
|
|
367
|
+
on_animation_end: EventHandler[lambda: []]
|
|
368
|
+
|
|
294
369
|
|
|
295
370
|
class Line(Cartesian):
|
|
296
371
|
"""A Line component in Recharts."""
|
|
@@ -323,11 +398,17 @@ class Line(Cartesian):
|
|
|
323
398
|
# Whether to connect a graph line across null points.
|
|
324
399
|
connect_nulls: Var[bool]
|
|
325
400
|
|
|
401
|
+
# The unit of data. This option will be used in tooltip.
|
|
402
|
+
unit: Var[Union[str, int]]
|
|
403
|
+
|
|
404
|
+
# The name of data displayed in the axis. This option will be used to represent an index in a scatter chart.
|
|
405
|
+
name: Var[Union[str, int]]
|
|
406
|
+
|
|
326
407
|
# Valid children components
|
|
327
408
|
_valid_children: List[str] = ["LabelList", "ErrorBar"]
|
|
328
409
|
|
|
329
410
|
|
|
330
|
-
class Scatter(
|
|
411
|
+
class Scatter(Recharts):
|
|
331
412
|
"""A Scatter component in Recharts."""
|
|
332
413
|
|
|
333
414
|
tag = "Scatter"
|
|
@@ -337,6 +418,15 @@ class Scatter(Cartesian):
|
|
|
337
418
|
# The source data, in which each element is an object.
|
|
338
419
|
data: Var[List[Dict[str, Any]]]
|
|
339
420
|
|
|
421
|
+
# The type of icon in legend. If set to 'none', no legend item will be rendered. 'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'
|
|
422
|
+
legend_type: Var[LiteralLegendType]
|
|
423
|
+
|
|
424
|
+
# The id of x-axis which is corresponding to the data.
|
|
425
|
+
x_axis_id: Var[Union[str, int]]
|
|
426
|
+
|
|
427
|
+
# The id of y-axis which is corresponding to the data.
|
|
428
|
+
y_axis_id: Var[Union[str, int]]
|
|
429
|
+
|
|
340
430
|
# The id of z-axis which is corresponding to the data.
|
|
341
431
|
z_axis_id: Var[str]
|
|
342
432
|
|
|
@@ -358,8 +448,44 @@ class Scatter(Cartesian):
|
|
|
358
448
|
# Valid children components.
|
|
359
449
|
_valid_children: List[str] = ["LabelList", "ErrorBar"]
|
|
360
450
|
|
|
451
|
+
# If set false, animation of bar will be disabled.
|
|
452
|
+
is_animation_active: Var[bool]
|
|
453
|
+
|
|
454
|
+
# Specifies when the animation should begin, the unit of this option is ms, default 0.
|
|
455
|
+
animation_begin: Var[int]
|
|
456
|
+
|
|
457
|
+
# Specifies the duration of animation, the unit of this option is ms, default 1500.
|
|
458
|
+
animation_duration: Var[int]
|
|
459
|
+
|
|
460
|
+
# The type of easing function, default 'ease'
|
|
461
|
+
animation_easing: Var[LiteralAnimationEasing]
|
|
462
|
+
|
|
463
|
+
# The customized event handler of click on the component in this group
|
|
464
|
+
on_click: EventHandler[lambda: []]
|
|
465
|
+
|
|
466
|
+
# The customized event handler of mousedown on the component in this group
|
|
467
|
+
on_mouse_down: EventHandler[lambda: []]
|
|
468
|
+
|
|
469
|
+
# The customized event handler of mouseup on the component in this group
|
|
470
|
+
on_mouse_up: EventHandler[lambda: []]
|
|
471
|
+
|
|
472
|
+
# The customized event handler of mousemove on the component in this group
|
|
473
|
+
on_mouse_move: EventHandler[lambda: []]
|
|
474
|
+
|
|
475
|
+
# The customized event handler of mouseover on the component in this group
|
|
476
|
+
on_mouse_over: EventHandler[lambda: []]
|
|
361
477
|
|
|
362
|
-
|
|
478
|
+
# The customized event handler of mouseout on the component in this group
|
|
479
|
+
on_mouse_out: EventHandler[lambda: []]
|
|
480
|
+
|
|
481
|
+
# The customized event handler of mouseenter on the component in this group
|
|
482
|
+
on_mouse_enter: EventHandler[lambda: []]
|
|
483
|
+
|
|
484
|
+
# The customized event handler of mouseleave on the component in this group
|
|
485
|
+
on_mouse_leave: EventHandler[lambda: []]
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
class Funnel(Recharts):
|
|
363
489
|
"""A Funnel component in Recharts."""
|
|
364
490
|
|
|
365
491
|
tag = "Funnel"
|
|
@@ -369,6 +495,18 @@ class Funnel(Cartesian):
|
|
|
369
495
|
# The source data, in which each element is an object.
|
|
370
496
|
data: Var[List[Dict[str, Any]]]
|
|
371
497
|
|
|
498
|
+
# The key of a group of data which should be unique in an area chart.
|
|
499
|
+
data_key: Var[Union[str, int]]
|
|
500
|
+
|
|
501
|
+
# The key or getter of a group of data which should be unique in a LineChart.
|
|
502
|
+
name_key: Var[str]
|
|
503
|
+
|
|
504
|
+
# The type of icon in legend. If set to 'none', no legend item will be rendered.
|
|
505
|
+
legend_type: Var[LiteralLegendType]
|
|
506
|
+
|
|
507
|
+
# If set false, animation of line will be disabled.
|
|
508
|
+
is_animation_active: Var[bool]
|
|
509
|
+
|
|
372
510
|
# Specifies when the animation should begin, the unit of this option is ms.
|
|
373
511
|
animation_begin: Var[int]
|
|
374
512
|
|
|
@@ -381,22 +519,35 @@ class Funnel(Cartesian):
|
|
|
381
519
|
# Valid children components
|
|
382
520
|
_valid_children: List[str] = ["LabelList", "Cell"]
|
|
383
521
|
|
|
384
|
-
|
|
385
|
-
|
|
522
|
+
# The customized event handler of animation start
|
|
523
|
+
on_animation_start: EventHandler[lambda: []]
|
|
386
524
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
525
|
+
# The customized event handler of animation end
|
|
526
|
+
on_animation_end: EventHandler[lambda: []]
|
|
527
|
+
|
|
528
|
+
# The customized event handler of click on the component in this group
|
|
529
|
+
on_click: EventHandler[lambda: []]
|
|
530
|
+
|
|
531
|
+
# The customized event handler of mousedown on the component in this group
|
|
532
|
+
on_mouse_down: EventHandler[lambda: []]
|
|
533
|
+
|
|
534
|
+
# The customized event handler of mouseup on the component in this group
|
|
535
|
+
on_mouse_up: EventHandler[lambda: []]
|
|
536
|
+
|
|
537
|
+
# The customized event handler of mousemove on the component in this group
|
|
538
|
+
on_mouse_move: EventHandler[lambda: []]
|
|
539
|
+
|
|
540
|
+
# The customized event handler of mouseover on the component in this group
|
|
541
|
+
on_mouse_over: EventHandler[lambda: []]
|
|
542
|
+
|
|
543
|
+
# The customized event handler of mouseout on the component in this group
|
|
544
|
+
on_mouse_out: EventHandler[lambda: []]
|
|
545
|
+
|
|
546
|
+
# The customized event handler of mouseenter on the component in this group
|
|
547
|
+
on_mouse_enter: EventHandler[lambda: []]
|
|
548
|
+
|
|
549
|
+
# The customized event handler of mouseleave on the component in this group
|
|
550
|
+
on_mouse_leave: EventHandler[lambda: []]
|
|
400
551
|
|
|
401
552
|
|
|
402
553
|
class ErrorBar(Recharts):
|
|
@@ -431,15 +582,12 @@ class Reference(Recharts):
|
|
|
431
582
|
# The id of y-axis which is corresponding to the data.
|
|
432
583
|
y_axis_id: Var[Union[str, int]]
|
|
433
584
|
|
|
434
|
-
# If set a string or a number, a vertical line perpendicular to the x-axis specified by xAxisId will be drawn. If the specified x-axis is a number axis, the type of x must be Number. If the specified x-axis is a category axis, the value of x must be one of the categorys, otherwise no line will be drawn.
|
|
435
|
-
x: Var[str]
|
|
436
|
-
|
|
437
|
-
# If set a string or a number, a horizontal line perpendicular to the y-axis specified by yAxisId will be drawn. If the specified y-axis is a number axis, the type of y must be Number. If the specified y-axis is a category axis, the value of y must be one of the categorys, otherwise no line will be drawn.
|
|
438
|
-
y: Var[str]
|
|
439
|
-
|
|
440
585
|
# Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas.
|
|
441
586
|
if_overflow: Var[LiteralIfOverflow]
|
|
442
587
|
|
|
588
|
+
# If set a string or a number, default label will be drawn, and the option is content.
|
|
589
|
+
label: Var[Union[str, int]]
|
|
590
|
+
|
|
443
591
|
# If set true, the line will be rendered in front of bars in BarChart, etc.
|
|
444
592
|
is_front: Var[bool]
|
|
445
593
|
|
|
@@ -451,12 +599,24 @@ class ReferenceLine(Reference):
|
|
|
451
599
|
|
|
452
600
|
alias = "RechartsReferenceLine"
|
|
453
601
|
|
|
602
|
+
# If set a string or a number, a vertical line perpendicular to the x-axis specified by xAxisId will be drawn. If the specified x-axis is a number axis, the type of x must be Number. If the specified x-axis is a category axis, the value of x must be one of the categorys, otherwise no line will be drawn.
|
|
603
|
+
x: Var[Union[str, int]]
|
|
604
|
+
|
|
605
|
+
# If set a string or a number, a horizontal line perpendicular to the y-axis specified by yAxisId will be drawn. If the specified y-axis is a number axis, the type of y must be Number. If the specified y-axis is a category axis, the value of y must be one of the categorys, otherwise no line will be drawn.
|
|
606
|
+
y: Var[Union[str, int]]
|
|
607
|
+
|
|
608
|
+
# The color of the reference line.
|
|
609
|
+
stroke: Var[Union[str, Color]]
|
|
610
|
+
|
|
454
611
|
# The width of the stroke.
|
|
455
|
-
stroke_width: Var[int]
|
|
612
|
+
stroke_width: Var[Union[str, int]]
|
|
456
613
|
|
|
457
614
|
# Valid children components
|
|
458
615
|
_valid_children: List[str] = ["Label"]
|
|
459
616
|
|
|
617
|
+
# Array of endpoints in { x, y } format. These endpoints would be used to draw the ReferenceLine.
|
|
618
|
+
segment: List[Any] = []
|
|
619
|
+
|
|
460
620
|
|
|
461
621
|
class ReferenceDot(Reference):
|
|
462
622
|
"""A ReferenceDot component in Recharts."""
|
|
@@ -465,23 +625,47 @@ class ReferenceDot(Reference):
|
|
|
465
625
|
|
|
466
626
|
alias = "RechartsReferenceDot"
|
|
467
627
|
|
|
628
|
+
# If set a string or a number, a vertical line perpendicular to the x-axis specified by xAxisId will be drawn. If the specified x-axis is a number axis, the type of x must be Number. If the specified x-axis is a category axis, the value of x must be one of the categorys, otherwise no line will be drawn.
|
|
629
|
+
x: Var[Union[str, int]]
|
|
630
|
+
|
|
631
|
+
# If set a string or a number, a horizontal line perpendicular to the y-axis specified by yAxisId will be drawn. If the specified y-axis is a number axis, the type of y must be Number. If the specified y-axis is a category axis, the value of y must be one of the categorys, otherwise no line will be drawn.
|
|
632
|
+
y: Var[Union[str, int]]
|
|
633
|
+
|
|
634
|
+
# The radius of dot.
|
|
635
|
+
r: Var[int]
|
|
636
|
+
|
|
637
|
+
# The color of the area fill.
|
|
638
|
+
fill: Var[Union[str, Color]]
|
|
639
|
+
|
|
640
|
+
# The color of the line stroke.
|
|
641
|
+
stroke: Var[Union[str, Color]]
|
|
642
|
+
|
|
468
643
|
# Valid children components
|
|
469
644
|
_valid_children: List[str] = ["Label"]
|
|
470
645
|
|
|
471
|
-
|
|
472
|
-
|
|
646
|
+
# The customized event handler of click on the component in this chart
|
|
647
|
+
on_click: EventHandler[lambda: []]
|
|
473
648
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
649
|
+
# The customized event handler of mousedown on the component in this chart
|
|
650
|
+
on_mouse_down: EventHandler[lambda: []]
|
|
651
|
+
|
|
652
|
+
# The customized event handler of mouseup on the component in this chart
|
|
653
|
+
on_mouse_up: EventHandler[lambda: []]
|
|
654
|
+
|
|
655
|
+
# The customized event handler of mouseover on the component in this chart
|
|
656
|
+
on_mouse_over: EventHandler[lambda: []]
|
|
657
|
+
|
|
658
|
+
# The customized event handler of mouseout on the component in this chart
|
|
659
|
+
on_mouse_out: EventHandler[lambda: []]
|
|
660
|
+
|
|
661
|
+
# The customized event handler of mouseenter on the component in this chart
|
|
662
|
+
on_mouse_enter: EventHandler[lambda: []]
|
|
663
|
+
|
|
664
|
+
# The customized event handler of mousemove on the component in this chart
|
|
665
|
+
on_mouse_move: EventHandler[lambda: []]
|
|
666
|
+
|
|
667
|
+
# The customized event handler of mouseleave on the component in this chart
|
|
668
|
+
on_mouse_leave: EventHandler[lambda: []]
|
|
485
669
|
|
|
486
670
|
|
|
487
671
|
class ReferenceArea(Recharts):
|
|
@@ -552,10 +736,16 @@ class CartesianGrid(Grid):
|
|
|
552
736
|
alias = "RechartsCartesianGrid"
|
|
553
737
|
|
|
554
738
|
# The horizontal line configuration.
|
|
555
|
-
horizontal: Var[
|
|
739
|
+
horizontal: Var[bool]
|
|
556
740
|
|
|
557
741
|
# The vertical line configuration.
|
|
558
|
-
vertical: Var[
|
|
742
|
+
vertical: Var[bool]
|
|
743
|
+
|
|
744
|
+
# The x-coordinates in pixel values of all vertical lines.
|
|
745
|
+
vertical_points: Var[List[Union[str, int]]]
|
|
746
|
+
|
|
747
|
+
# The x-coordinates in pixel values of all vertical lines.
|
|
748
|
+
horizontal_points: Var[List[Union[str, int]]]
|
|
559
749
|
|
|
560
750
|
# The background of grid.
|
|
561
751
|
fill: Var[Union[str, Color]]
|