You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reflex/components/recharts/cartesian.py
+15-20Lines changed: 15 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,9 @@
11
11
fromreflex.vars.baseimportLiteralVar, Var
12
12
13
13
from .rechartsimport (
14
+
ACTIVE_DOT_TYPE,
14
15
LiteralAnimationEasing,
15
-
LiteralAreaType,
16
+
LiteralCurveType,
16
17
LiteralDirection,
17
18
LiteralIfOverflow,
18
19
LiteralInterval,
@@ -89,7 +90,7 @@ class Axis(Recharts):
89
90
ticks: Var[Sequence[str|int]]
90
91
91
92
# If set false, no ticks will be drawn.
92
-
tick: Var[bool]
93
+
tick: Var[bool|dict]
93
94
94
95
# The count of axis ticks. Not used if 'type' is 'category'. Default: 5
95
96
tick_count: Var[int]
@@ -275,6 +276,9 @@ class Cartesian(Recharts):
275
276
# 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
276
277
legend_type: Var[LiteralLegendType]
277
278
279
+
# If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False
280
+
label: Var[bool|dict[str, Any]]
281
+
278
282
# If set false, animation of bar will be disabled. Default: True
# If false set, dots will not be drawn. If true set, dots will be drawn which have the props calculated internally. Default: False
347
-
dot: Var[bool|dict[str, Any]]
351
+
dot: Var[ACTIVE_DOT_TYPE]
348
352
349
353
# The dot is shown when user enter an area chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally. Default: {stroke: rx.color("accent", 2), fill: rx.color("accent", 10)}
# If set false, labels will not be drawn. If set true, labels will be drawn which have the props calculated internally. Default: False
358
-
label: Var[bool]
359
-
360
361
# The value which can describle the line, usually calculated internally.
361
-
base_line: Var[str|Sequence[dict[str, Any]]]
362
+
base_line: Var[int|Sequence[dict[str, Any]]]
362
363
363
364
# The coordinates of all the points in the area, usually calculated internally.
364
365
points: Var[Sequence[dict[str, Any]]]
@@ -392,9 +393,6 @@ class Bar(Cartesian):
392
393
# If false set, background of bars will not be drawn. If true set, background of bars will be drawn which have the props calculated internally. Default: False
393
394
background: Var[bool]
394
395
395
-
# If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False
396
-
label: Var[bool]
397
-
398
396
# 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.
399
397
stack_id: Var[str]
400
398
@@ -431,7 +429,7 @@ class Line(Cartesian):
431
429
alias="RechartsLine"
432
430
433
431
# The interpolation type of line. And customized interpolation function can be set to type. It's the same as type in Area.
434
-
type_: Var[LiteralAreaType]
432
+
type_: Var[LiteralCurveType]
435
433
436
434
# The color of the line stroke. Default: rx.color("accent", 9)
# The dot is shown when mouse enter a line chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally. Default: {"stroke": rx.color("accent", 10), "fill": rx.color("accent", 4)}
443
-
dot: Var[bool|dict[str, Any]] =LiteralVar.create(
441
+
dot: Var[ACTIVE_DOT_TYPE] =LiteralVar.create(
444
442
{
445
443
"stroke": Color("accent", 10),
446
444
"fill": Color("accent", 4),
447
445
}
448
446
)
449
447
450
448
# The dot is shown when user enter an area chart and this chart has tooltip. If false set, no active dot will not be drawn. If true set, active dot will be drawn which have the props calculated internally. Default: {"stroke": rx.color("accent", 2), "fill": rx.color("accent", 10)}
0 commit comments