reflex 0.7.1a3__py3-none-any.whl → 0.7.2a1__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/jinja/web/utils/context.js.jinja2 +8 -8
- reflex/.templates/web/components/reflex/radix_themes_color_mode_provider.js +3 -3
- reflex/admin.py +1 -2
- reflex/app.py +53 -50
- reflex/app_mixins/lifespan.py +2 -2
- reflex/app_mixins/middleware.py +1 -2
- reflex/assets.py +1 -2
- reflex/base.py +2 -2
- reflex/compiler/compiler.py +51 -16
- reflex/compiler/utils.py +4 -13
- reflex/components/base/app_wrap.pyi +7 -7
- reflex/components/base/bare.py +3 -3
- reflex/components/base/body.pyi +7 -7
- reflex/components/base/document.py +1 -3
- reflex/components/base/document.pyi +32 -32
- reflex/components/base/error_boundary.py +2 -4
- reflex/components/base/error_boundary.pyi +11 -13
- reflex/components/base/fragment.pyi +7 -7
- reflex/components/base/head.pyi +13 -13
- reflex/components/base/link.pyi +22 -22
- reflex/components/base/meta.py +5 -7
- reflex/components/base/meta.pyi +40 -40
- reflex/components/base/script.pyi +11 -14
- reflex/components/base/strict_mode.pyi +7 -7
- reflex/components/component.py +188 -113
- reflex/components/core/auto_scroll.py +8 -1
- reflex/components/core/auto_scroll.pyi +183 -210
- reflex/components/core/banner.py +2 -4
- reflex/components/core/banner.pyi +390 -444
- reflex/components/core/breakpoints.py +5 -5
- reflex/components/core/client_side_routing.pyi +14 -14
- reflex/components/core/clipboard.py +4 -4
- reflex/components/core/clipboard.pyi +12 -14
- reflex/components/core/cond.py +17 -25
- reflex/components/core/debounce.py +3 -3
- reflex/components/core/debounce.pyi +14 -14
- reflex/components/core/foreach.py +7 -2
- reflex/components/core/html.py +1 -3
- reflex/components/core/html.pyi +184 -213
- reflex/components/core/match.py +15 -19
- reflex/components/core/sticky.pyi +930 -1078
- reflex/components/core/upload.py +4 -4
- reflex/components/core/upload.pyi +62 -62
- reflex/components/datadisplay/code.py +6 -6
- reflex/components/datadisplay/code.pyi +1159 -1165
- reflex/components/datadisplay/dataeditor.py +49 -49
- reflex/components/datadisplay/dataeditor.pyi +95 -123
- reflex/components/datadisplay/logo.py +1 -3
- reflex/components/datadisplay/shiki_code_block.py +8 -10
- reflex/components/datadisplay/shiki_code_block.pyi +1678 -1720
- reflex/components/el/element.pyi +7 -7
- reflex/components/el/elements/base.pyi +183 -210
- reflex/components/el/elements/forms.py +23 -23
- reflex/components/el/elements/forms.pyi +2571 -2933
- reflex/components/el/elements/inline.py +4 -4
- reflex/components/el/elements/inline.pyi +5191 -5953
- reflex/components/el/elements/media.py +47 -47
- reflex/components/el/elements/media.pyi +4802 -5500
- reflex/components/el/elements/metadata.py +1 -3
- reflex/components/el/elements/metadata.pyi +782 -896
- reflex/components/el/elements/other.pyi +1278 -1467
- reflex/components/el/elements/scripts.pyi +580 -667
- reflex/components/el/elements/sectioning.pyi +2761 -3166
- reflex/components/el/elements/tables.pyi +1840 -2119
- reflex/components/el/elements/typography.pyi +2772 -3179
- reflex/components/gridjs/datatable.py +7 -7
- reflex/components/gridjs/datatable.pyi +19 -19
- reflex/components/lucide/icon.pyi +21 -21
- reflex/components/markdown/markdown.py +2 -2
- reflex/components/markdown/markdown.pyi +9 -9
- reflex/components/moment/moment.py +11 -12
- reflex/components/moment/moment.pyi +44 -47
- reflex/components/next/base.pyi +7 -7
- reflex/components/next/image.py +3 -3
- reflex/components/next/image.pyi +19 -21
- reflex/components/next/link.pyi +9 -9
- reflex/components/next/video.py +1 -3
- reflex/components/next/video.pyi +9 -9
- reflex/components/plotly/plotly.py +22 -45
- reflex/components/plotly/plotly.pyi +164 -164
- reflex/components/radix/primitives/accordion.py +14 -14
- reflex/components/radix/primitives/accordion.pyi +439 -487
- reflex/components/radix/primitives/base.py +1 -3
- reflex/components/radix/primitives/base.pyi +15 -15
- reflex/components/radix/primitives/drawer.py +3 -3
- reflex/components/radix/primitives/drawer.pyi +110 -116
- reflex/components/radix/primitives/form.py +1 -1
- reflex/components/radix/primitives/form.pyi +668 -752
- reflex/components/radix/primitives/progress.py +6 -6
- reflex/components/radix/primitives/progress.pyi +225 -243
- reflex/components/radix/primitives/slider.py +6 -6
- reflex/components/radix/primitives/slider.pyi +52 -55
- reflex/components/radix/themes/base.py +3 -6
- reflex/components/radix/themes/base.pyi +197 -303
- reflex/components/radix/themes/color_mode.py +5 -5
- reflex/components/radix/themes/color_mode.pyi +366 -436
- reflex/components/radix/themes/components/alert_dialog.pyi +229 -262
- reflex/components/radix/themes/components/aspect_ratio.py +1 -3
- reflex/components/radix/themes/components/aspect_ratio.pyi +8 -8
- reflex/components/radix/themes/components/avatar.pyi +79 -94
- reflex/components/radix/themes/components/badge.pyi +252 -295
- reflex/components/radix/themes/components/button.pyi +269 -314
- reflex/components/radix/themes/components/callout.py +2 -2
- reflex/components/radix/themes/components/callout.pyi +1116 -1290
- reflex/components/radix/themes/components/card.pyi +194 -229
- reflex/components/radix/themes/components/checkbox.pyi +243 -278
- reflex/components/radix/themes/components/checkbox_cards.py +3 -7
- reflex/components/radix/themes/components/checkbox_cards.pyi +101 -135
- reflex/components/radix/themes/components/checkbox_group.py +2 -2
- reflex/components/radix/themes/components/checkbox_group.pyi +83 -96
- reflex/components/radix/themes/components/context_menu.py +18 -15
- reflex/components/radix/themes/components/context_menu.pyi +408 -458
- reflex/components/radix/themes/components/data_list.pyi +122 -147
- reflex/components/radix/themes/components/dialog.pyi +231 -264
- reflex/components/radix/themes/components/dropdown_menu.py +16 -13
- reflex/components/radix/themes/components/dropdown_menu.pyi +223 -246
- reflex/components/radix/themes/components/hover_card.py +2 -2
- reflex/components/radix/themes/components/hover_card.pyi +237 -282
- reflex/components/radix/themes/components/icon_button.pyi +269 -314
- reflex/components/radix/themes/components/inset.py +8 -8
- reflex/components/radix/themes/components/inset.pyi +232 -292
- reflex/components/radix/themes/components/popover.py +2 -2
- reflex/components/radix/themes/components/popover.pyi +229 -271
- reflex/components/radix/themes/components/progress.pyi +80 -96
- reflex/components/radix/themes/components/radio.pyi +73 -86
- reflex/components/radix/themes/components/radio_cards.py +4 -8
- reflex/components/radix/themes/components/radio_cards.pyi +117 -154
- reflex/components/radix/themes/components/radio_group.py +3 -3
- reflex/components/radix/themes/components/radio_group.pyi +250 -291
- reflex/components/radix/themes/components/scroll_area.pyi +14 -20
- reflex/components/radix/themes/components/segmented_control.py +6 -6
- reflex/components/radix/themes/components/segmented_control.pyi +89 -108
- reflex/components/radix/themes/components/select.py +7 -7
- reflex/components/radix/themes/components/select.pyi +376 -444
- reflex/components/radix/themes/components/separator.pyi +79 -93
- reflex/components/radix/themes/components/skeleton.pyi +32 -26
- reflex/components/radix/themes/components/slider.py +8 -8
- reflex/components/radix/themes/components/slider.pyi +99 -122
- reflex/components/radix/themes/components/spinner.pyi +12 -19
- reflex/components/radix/themes/components/switch.pyi +84 -99
- reflex/components/radix/themes/components/table.py +9 -9
- reflex/components/radix/themes/components/table.pyi +1440 -1794
- reflex/components/radix/themes/components/tabs.py +4 -4
- reflex/components/radix/themes/components/tabs.pyi +120 -132
- reflex/components/radix/themes/components/text_area.pyi +281 -331
- reflex/components/radix/themes/components/text_field.py +2 -2
- reflex/components/radix/themes/components/text_field.pyi +639 -734
- reflex/components/radix/themes/components/tooltip.py +6 -6
- reflex/components/radix/themes/components/tooltip.pyi +34 -43
- reflex/components/radix/themes/layout/base.pyi +85 -182
- reflex/components/radix/themes/layout/box.pyi +183 -210
- reflex/components/radix/themes/layout/center.pyi +225 -286
- reflex/components/radix/themes/layout/container.pyi +191 -224
- reflex/components/radix/themes/layout/flex.py +2 -2
- reflex/components/radix/themes/layout/flex.pyi +225 -286
- reflex/components/radix/themes/layout/grid.py +2 -2
- reflex/components/radix/themes/layout/grid.pyi +245 -315
- reflex/components/radix/themes/layout/list.py +2 -2
- reflex/components/radix/themes/layout/list.pyi +712 -815
- reflex/components/radix/themes/layout/section.pyi +187 -221
- reflex/components/radix/themes/layout/spacer.pyi +225 -286
- reflex/components/radix/themes/layout/stack.pyi +625 -768
- reflex/components/radix/themes/typography/blockquote.pyi +257 -299
- reflex/components/radix/themes/typography/code.pyi +259 -304
- reflex/components/radix/themes/typography/heading.pyi +272 -324
- reflex/components/radix/themes/typography/link.pyi +302 -358
- reflex/components/radix/themes/typography/text.pyi +1669 -1945
- reflex/components/react_player/audio.pyi +20 -22
- reflex/components/react_player/react_player.pyi +19 -19
- reflex/components/react_player/video.pyi +20 -22
- reflex/components/recharts/cartesian.py +100 -97
- reflex/components/recharts/cartesian.pyi +891 -1007
- reflex/components/recharts/charts.py +42 -42
- reflex/components/recharts/charts.pyi +212 -249
- reflex/components/recharts/general.py +22 -21
- reflex/components/recharts/general.pyi +198 -223
- reflex/components/recharts/polar.py +42 -45
- reflex/components/recharts/polar.pyi +254 -288
- reflex/components/recharts/recharts.pyi +13 -13
- reflex/components/sonner/toast.py +20 -20
- reflex/components/sonner/toast.pyi +58 -61
- reflex/components/suneditor/editor.py +9 -9
- reflex/components/suneditor/editor.pyi +78 -83
- reflex/components/tags/cond_tag.py +2 -2
- reflex/components/tags/iter_tag.py +10 -14
- reflex/components/tags/match_tag.py +2 -2
- reflex/components/tags/tag.py +10 -10
- reflex/config.py +36 -35
- reflex/constants/__init__.py +56 -53
- reflex/custom_components/custom_components.py +6 -7
- reflex/event.py +38 -42
- reflex/experimental/client_state.py +2 -4
- reflex/experimental/layout.py +2 -2
- reflex/experimental/layout.pyi +579 -663
- reflex/istate/data.py +4 -5
- reflex/middleware/hydrate_middleware.py +2 -2
- reflex/middleware/middleware.py +2 -2
- reflex/model.py +3 -5
- reflex/page.py +2 -2
- reflex/reflex.py +9 -10
- reflex/state.py +77 -49
- reflex/style.py +9 -3
- reflex/testing.py +21 -24
- reflex/utils/console.py +1 -1
- reflex/utils/decorator.py +26 -1
- reflex/utils/exec.py +6 -11
- reflex/utils/export.py +2 -3
- reflex/utils/format.py +4 -4
- reflex/utils/imports.py +12 -12
- reflex/utils/prerequisites.py +35 -84
- reflex/utils/processes.py +5 -5
- reflex/utils/pyi_generator.py +33 -22
- reflex/utils/serializers.py +60 -15
- reflex/utils/types.py +237 -56
- reflex/vars/base.py +122 -72
- reflex/vars/datetime.py +2 -2
- reflex/vars/function.py +52 -55
- reflex/vars/number.py +59 -5
- reflex/vars/object.py +57 -26
- reflex/vars/sequence.py +983 -958
- {reflex-0.7.1a3.dist-info → reflex-0.7.2a1.dist-info}/METADATA +3 -6
- reflex-0.7.2a1.dist-info/RECORD +405 -0
- {reflex-0.7.1a3.dist-info → reflex-0.7.2a1.dist-info}/WHEEL +1 -1
- reflex-0.7.1a3.dist-info/RECORD +0 -405
- {reflex-0.7.1a3.dist-info → reflex-0.7.2a1.dist-info}/LICENSE +0 -0
- {reflex-0.7.1a3.dist-info → reflex-0.7.2a1.dist-info}/entry_points.txt +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Any,
|
|
5
|
+
from typing import Any, ClassVar, Sequence
|
|
6
6
|
|
|
7
7
|
from reflex.components.component import Component
|
|
8
8
|
from reflex.components.recharts.general import ResponsiveContainer
|
|
@@ -25,10 +25,10 @@ class ChartBase(RechartsCharts):
|
|
|
25
25
|
"""A component that wraps a Recharts charts."""
|
|
26
26
|
|
|
27
27
|
# The width of chart container. String or Integer
|
|
28
|
-
width: Var[
|
|
28
|
+
width: Var[str | int] = Var.create("100%")
|
|
29
29
|
|
|
30
30
|
# The height of chart container.
|
|
31
|
-
height: Var[
|
|
31
|
+
height: Var[str | int] = Var.create("100%")
|
|
32
32
|
|
|
33
33
|
# The customized event handler of click on the component in this chart
|
|
34
34
|
on_click: EventHandler[no_args_event_spec]
|
|
@@ -104,10 +104,10 @@ class CategoricalChartBase(ChartBase):
|
|
|
104
104
|
"""A component that wraps a Categorical Recharts charts."""
|
|
105
105
|
|
|
106
106
|
# The source data, in which each element is an object.
|
|
107
|
-
data: Var[
|
|
107
|
+
data: Var[Sequence[dict[str, Any]]]
|
|
108
108
|
|
|
109
109
|
# The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
|
|
110
|
-
margin: Var[
|
|
110
|
+
margin: Var[dict[str, Any]]
|
|
111
111
|
|
|
112
112
|
# 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.
|
|
113
113
|
sync_id: Var[str]
|
|
@@ -130,10 +130,10 @@ class AreaChart(CategoricalChartBase):
|
|
|
130
130
|
alias = "RechartsAreaChart"
|
|
131
131
|
|
|
132
132
|
# The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'. Default: "auto"
|
|
133
|
-
base_value: Var[
|
|
133
|
+
base_value: Var[int | LiteralComposedChartBaseValue]
|
|
134
134
|
|
|
135
135
|
# Valid children components
|
|
136
|
-
_valid_children:
|
|
136
|
+
_valid_children: ClassVar[list[str]] = [
|
|
137
137
|
"XAxis",
|
|
138
138
|
"YAxis",
|
|
139
139
|
"ReferenceArea",
|
|
@@ -156,10 +156,10 @@ class BarChart(CategoricalChartBase):
|
|
|
156
156
|
alias = "RechartsBarChart"
|
|
157
157
|
|
|
158
158
|
# The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number. Default: "10%"
|
|
159
|
-
bar_category_gap: Var[
|
|
159
|
+
bar_category_gap: Var[str | int]
|
|
160
160
|
|
|
161
161
|
# The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number. Default: 4
|
|
162
|
-
bar_gap: Var[
|
|
162
|
+
bar_gap: Var[str | int]
|
|
163
163
|
|
|
164
164
|
# The width of all the bars in the chart. Number
|
|
165
165
|
bar_size: Var[int]
|
|
@@ -174,7 +174,7 @@ class BarChart(CategoricalChartBase):
|
|
|
174
174
|
reverse_stack_order: Var[bool]
|
|
175
175
|
|
|
176
176
|
# Valid children components
|
|
177
|
-
_valid_children:
|
|
177
|
+
_valid_children: ClassVar[list[str]] = [
|
|
178
178
|
"XAxis",
|
|
179
179
|
"YAxis",
|
|
180
180
|
"ReferenceArea",
|
|
@@ -196,7 +196,7 @@ class LineChart(CategoricalChartBase):
|
|
|
196
196
|
alias = "RechartsLineChart"
|
|
197
197
|
|
|
198
198
|
# Valid children components
|
|
199
|
-
_valid_children:
|
|
199
|
+
_valid_children: ClassVar[list[str]] = [
|
|
200
200
|
"XAxis",
|
|
201
201
|
"YAxis",
|
|
202
202
|
"ReferenceArea",
|
|
@@ -218,10 +218,10 @@ class ComposedChart(CategoricalChartBase):
|
|
|
218
218
|
alias = "RechartsComposedChart"
|
|
219
219
|
|
|
220
220
|
# The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'. Default: "auto"
|
|
221
|
-
base_value: Var[
|
|
221
|
+
base_value: Var[int | LiteralComposedChartBaseValue]
|
|
222
222
|
|
|
223
223
|
# The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number. Default: "10%"
|
|
224
|
-
bar_category_gap: Var[
|
|
224
|
+
bar_category_gap: Var[str | int]
|
|
225
225
|
|
|
226
226
|
# The gap between two bars in the same category. Default: 4
|
|
227
227
|
bar_gap: Var[int]
|
|
@@ -233,7 +233,7 @@ class ComposedChart(CategoricalChartBase):
|
|
|
233
233
|
reverse_stack_order: Var[bool]
|
|
234
234
|
|
|
235
235
|
# Valid children components
|
|
236
|
-
_valid_children:
|
|
236
|
+
_valid_children: ClassVar[list[str]] = [
|
|
237
237
|
"XAxis",
|
|
238
238
|
"YAxis",
|
|
239
239
|
"ReferenceArea",
|
|
@@ -257,10 +257,10 @@ class PieChart(ChartBase):
|
|
|
257
257
|
alias = "RechartsPieChart"
|
|
258
258
|
|
|
259
259
|
# The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
|
|
260
|
-
margin: Var[
|
|
260
|
+
margin: Var[dict[str, Any]]
|
|
261
261
|
|
|
262
262
|
# Valid children components
|
|
263
|
-
_valid_children:
|
|
263
|
+
_valid_children: ClassVar[list[str]] = [
|
|
264
264
|
"PolarAngleAxis",
|
|
265
265
|
"PolarRadiusAxis",
|
|
266
266
|
"PolarGrid",
|
|
@@ -290,16 +290,16 @@ class RadarChart(ChartBase):
|
|
|
290
290
|
alias = "RechartsRadarChart"
|
|
291
291
|
|
|
292
292
|
# The source data, in which each element is an object.
|
|
293
|
-
data: Var[
|
|
293
|
+
data: Var[Sequence[dict[str, Any]]]
|
|
294
294
|
|
|
295
295
|
# The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}. Default: {"top": 0, "right": 0, "left": 0, "bottom": 0}
|
|
296
|
-
margin: Var[
|
|
296
|
+
margin: Var[dict[str, Any]]
|
|
297
297
|
|
|
298
298
|
# The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage. Default: "50%"
|
|
299
|
-
cx: Var[
|
|
299
|
+
cx: Var[int | str]
|
|
300
300
|
|
|
301
301
|
# The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage. Default: "50%"
|
|
302
|
-
cy: Var[
|
|
302
|
+
cy: Var[int | str]
|
|
303
303
|
|
|
304
304
|
# The angle of first radial direction line. Default: 90
|
|
305
305
|
start_angle: Var[int]
|
|
@@ -308,13 +308,13 @@ class RadarChart(ChartBase):
|
|
|
308
308
|
end_angle: Var[int]
|
|
309
309
|
|
|
310
310
|
# The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: 0
|
|
311
|
-
inner_radius: Var[
|
|
311
|
+
inner_radius: Var[int | str]
|
|
312
312
|
|
|
313
313
|
# The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: "80%"
|
|
314
|
-
outer_radius: Var[
|
|
314
|
+
outer_radius: Var[int | str]
|
|
315
315
|
|
|
316
316
|
# Valid children components
|
|
317
|
-
_valid_children:
|
|
317
|
+
_valid_children: ClassVar[list[str]] = [
|
|
318
318
|
"PolarAngleAxis",
|
|
319
319
|
"PolarRadiusAxis",
|
|
320
320
|
"PolarGrid",
|
|
@@ -323,7 +323,7 @@ class RadarChart(ChartBase):
|
|
|
323
323
|
"Radar",
|
|
324
324
|
]
|
|
325
325
|
|
|
326
|
-
def get_event_triggers(self) -> dict[str,
|
|
326
|
+
def get_event_triggers(self) -> dict[str, Var | Any]:
|
|
327
327
|
"""Get the event triggers that pass the component's value to the handler.
|
|
328
328
|
|
|
329
329
|
Returns:
|
|
@@ -344,16 +344,16 @@ class RadialBarChart(ChartBase):
|
|
|
344
344
|
alias = "RechartsRadialBarChart"
|
|
345
345
|
|
|
346
346
|
# The source data which each element is an object.
|
|
347
|
-
data: Var[
|
|
347
|
+
data: Var[Sequence[dict[str, Any]]]
|
|
348
348
|
|
|
349
349
|
# The sizes of whitespace around the chart. Default: {"top": 5, "right": 5, "left": 5 "bottom": 5}
|
|
350
|
-
margin: Var[
|
|
350
|
+
margin: Var[dict[str, Any]]
|
|
351
351
|
|
|
352
352
|
# The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage. Default: "50%"
|
|
353
|
-
cx: Var[
|
|
353
|
+
cx: Var[int | str]
|
|
354
354
|
|
|
355
355
|
# The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage. Default: "50%"
|
|
356
|
-
cy: Var[
|
|
356
|
+
cy: Var[int | str]
|
|
357
357
|
|
|
358
358
|
# The angle of first radial direction line. Default: 0
|
|
359
359
|
start_angle: Var[int]
|
|
@@ -362,13 +362,13 @@ class RadialBarChart(ChartBase):
|
|
|
362
362
|
end_angle: Var[int]
|
|
363
363
|
|
|
364
364
|
# The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: "30%"
|
|
365
|
-
inner_radius: Var[
|
|
365
|
+
inner_radius: Var[int | str]
|
|
366
366
|
|
|
367
367
|
# The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: "100%"
|
|
368
|
-
outer_radius: Var[
|
|
368
|
+
outer_radius: Var[int | str]
|
|
369
369
|
|
|
370
370
|
# The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number. Default: "10%"
|
|
371
|
-
bar_category_gap: Var[
|
|
371
|
+
bar_category_gap: Var[int | str]
|
|
372
372
|
|
|
373
373
|
# The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number. Default: 4
|
|
374
374
|
bar_gap: Var[str]
|
|
@@ -377,7 +377,7 @@ class RadialBarChart(ChartBase):
|
|
|
377
377
|
bar_size: Var[int]
|
|
378
378
|
|
|
379
379
|
# Valid children components
|
|
380
|
-
_valid_children:
|
|
380
|
+
_valid_children: ClassVar[list[str]] = [
|
|
381
381
|
"PolarAngleAxis",
|
|
382
382
|
"PolarRadiusAxis",
|
|
383
383
|
"PolarGrid",
|
|
@@ -395,10 +395,10 @@ class ScatterChart(ChartBase):
|
|
|
395
395
|
alias = "RechartsScatterChart"
|
|
396
396
|
|
|
397
397
|
# The sizes of whitespace around the chart. Default: {"top": 5, "right": 5, "bottom": 5, "left": 5}
|
|
398
|
-
margin: Var[
|
|
398
|
+
margin: Var[dict[str, Any]]
|
|
399
399
|
|
|
400
400
|
# Valid children components
|
|
401
|
-
_valid_children:
|
|
401
|
+
_valid_children: ClassVar[list[str]] = [
|
|
402
402
|
"XAxis",
|
|
403
403
|
"YAxis",
|
|
404
404
|
"ZAxis",
|
|
@@ -412,7 +412,7 @@ class ScatterChart(ChartBase):
|
|
|
412
412
|
"Scatter",
|
|
413
413
|
]
|
|
414
414
|
|
|
415
|
-
def get_event_triggers(self) -> dict[str,
|
|
415
|
+
def get_event_triggers(self) -> dict[str, Var | Any]:
|
|
416
416
|
"""Get the event triggers that pass the component's value to the handler.
|
|
417
417
|
|
|
418
418
|
Returns:
|
|
@@ -441,13 +441,13 @@ class FunnelChart(ChartBase):
|
|
|
441
441
|
layout: Var[str]
|
|
442
442
|
|
|
443
443
|
# The sizes of whitespace around the chart. Default: {"top": 5, "right": 5, "bottom": 5, "left": 5}
|
|
444
|
-
margin: Var[
|
|
444
|
+
margin: Var[dict[str, Any]]
|
|
445
445
|
|
|
446
446
|
# The stroke color of each bar. String | Object
|
|
447
|
-
stroke: Var[
|
|
447
|
+
stroke: Var[str | Color]
|
|
448
448
|
|
|
449
449
|
# Valid children components
|
|
450
|
-
_valid_children:
|
|
450
|
+
_valid_children: ClassVar[list[str]] = ["Legend", "GraphingTooltip", "Funnel"]
|
|
451
451
|
|
|
452
452
|
|
|
453
453
|
class Treemap(RechartsCharts):
|
|
@@ -458,16 +458,16 @@ class Treemap(RechartsCharts):
|
|
|
458
458
|
alias = "RechartsTreemap"
|
|
459
459
|
|
|
460
460
|
# The width of chart container. String or Integer. Default: "100%"
|
|
461
|
-
width: Var[
|
|
461
|
+
width: Var[str | int] = Var.create("100%")
|
|
462
462
|
|
|
463
463
|
# The height of chart container. String or Integer. Default: "100%"
|
|
464
|
-
height: Var[
|
|
464
|
+
height: Var[str | int] = Var.create("100%")
|
|
465
465
|
|
|
466
466
|
# data of treemap. Array
|
|
467
|
-
data: Var[
|
|
467
|
+
data: Var[Sequence[dict[str, Any]]]
|
|
468
468
|
|
|
469
469
|
# The key of a group of data which should be unique in a treemap. String | Number. Default: "value"
|
|
470
|
-
data_key: Var[
|
|
470
|
+
data_key: Var[str | int]
|
|
471
471
|
|
|
472
472
|
# The key of each sector's name. String. Default: "name"
|
|
473
473
|
name_key: Var[str]
|