default props comment for Radar (#4104)
This commit is contained in:
parent
535c8f904d
commit
ffcf87d587
@ -106,36 +106,50 @@ class Radar(Recharts):
|
|||||||
# The coordinates of all the vertexes of the radar shape, like [{ x, y }].
|
# The coordinates of all the vertexes of the radar shape, like [{ x, y }].
|
||||||
points: Var[List[Dict[str, Any]]]
|
points: Var[List[Dict[str, Any]]]
|
||||||
|
|
||||||
# If false set, dots will not be drawn
|
# If false set, dots will not be drawn. Default: True
|
||||||
dot: Var[bool]
|
dot: Var[bool]
|
||||||
|
|
||||||
# Stoke color
|
# Stoke color. Default: rx.color("accent", 9)
|
||||||
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
|
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
|
||||||
|
|
||||||
# Fill color
|
# Fill color. Default: rx.color("accent", 3)
|
||||||
fill: Var[str] = LiteralVar.create(Color("accent", 3))
|
fill: Var[str] = LiteralVar.create(Color("accent", 3))
|
||||||
|
|
||||||
# opacity
|
# opacity. Default: 0.6
|
||||||
fill_opacity: Var[float] = LiteralVar.create(0.6)
|
fill_opacity: Var[float] = LiteralVar.create(0.6)
|
||||||
|
|
||||||
# The type of icon in legend. If set to 'none', no legend item will be rendered.
|
# The type of icon in legend. If set to 'none', no legend item will be rendered. Default: "rect"
|
||||||
legend_type: Var[str]
|
legend_type: Var[LiteralLegendType]
|
||||||
|
|
||||||
# If false set, labels will not be drawn
|
# If false set, labels will not be drawn. Default: True
|
||||||
label: Var[bool]
|
label: Var[bool]
|
||||||
|
|
||||||
# Specifies when the animation should begin, the unit of this option is ms.
|
# If set false, animation of polygon will be disabled. Default: True in CSR, and False in SSR
|
||||||
|
is_animation_active: Var[bool]
|
||||||
|
|
||||||
|
# Specifies when the animation should begin, the unit of this option is ms. Default: 0
|
||||||
animation_begin: Var[int]
|
animation_begin: Var[int]
|
||||||
|
|
||||||
# Specifies the duration of animation, the unit of this option is ms.
|
# Specifies the duration of animation, the unit of this option is ms. Default: 1500
|
||||||
animation_duration: Var[int]
|
animation_duration: Var[int]
|
||||||
|
|
||||||
# The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'
|
# The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. Default: "ease"
|
||||||
animation_easing: Var[LiteralAnimationEasing]
|
animation_easing: Var[LiteralAnimationEasing]
|
||||||
|
|
||||||
# Valid children components
|
# Valid children components
|
||||||
_valid_children: List[str] = ["LabelList"]
|
_valid_children: List[str] = ["LabelList"]
|
||||||
|
|
||||||
|
def get_event_triggers(self) -> dict[str, Union[Var, Any]]:
|
||||||
|
"""Get the event triggers that pass the component's value to the handler.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A dict mapping the event trigger to the var that is passed to the handler.
|
||||||
|
"""
|
||||||
|
return {
|
||||||
|
EventTriggers.ON_ANIMATION_START: lambda: [],
|
||||||
|
EventTriggers.ON_ANIMATION_END: lambda: [],
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class RadialBar(Recharts):
|
class RadialBar(Recharts):
|
||||||
"""A RadialBar chart component in Recharts."""
|
"""A RadialBar chart component in Recharts."""
|
||||||
|
@ -126,6 +126,7 @@ class Pie(Recharts):
|
|||||||
...
|
...
|
||||||
|
|
||||||
class Radar(Recharts):
|
class Radar(Recharts):
|
||||||
|
def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
|
||||||
@overload
|
@overload
|
||||||
@classmethod
|
@classmethod
|
||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
@ -137,8 +138,40 @@ class Radar(Recharts):
|
|||||||
stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
|
stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
|
||||||
fill: Optional[Union[Var[str], str]] = None,
|
fill: Optional[Union[Var[str], str]] = None,
|
||||||
fill_opacity: Optional[Union[Var[float], float]] = None,
|
fill_opacity: Optional[Union[Var[float], float]] = None,
|
||||||
legend_type: Optional[Union[Var[str], str]] = None,
|
legend_type: Optional[
|
||||||
|
Union[
|
||||||
|
Literal[
|
||||||
|
"circle",
|
||||||
|
"cross",
|
||||||
|
"diamond",
|
||||||
|
"line",
|
||||||
|
"none",
|
||||||
|
"plainline",
|
||||||
|
"rect",
|
||||||
|
"square",
|
||||||
|
"star",
|
||||||
|
"triangle",
|
||||||
|
"wye",
|
||||||
|
],
|
||||||
|
Var[
|
||||||
|
Literal[
|
||||||
|
"circle",
|
||||||
|
"cross",
|
||||||
|
"diamond",
|
||||||
|
"line",
|
||||||
|
"none",
|
||||||
|
"plainline",
|
||||||
|
"rect",
|
||||||
|
"square",
|
||||||
|
"star",
|
||||||
|
"triangle",
|
||||||
|
"wye",
|
||||||
|
]
|
||||||
|
],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
label: Optional[Union[Var[bool], bool]] = None,
|
label: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
is_animation_active: Optional[Union[Var[bool], bool]] = None,
|
||||||
animation_begin: Optional[Union[Var[int], int]] = None,
|
animation_begin: Optional[Union[Var[int], int]] = None,
|
||||||
animation_duration: Optional[Union[Var[int], int]] = None,
|
animation_duration: Optional[Union[Var[int], int]] = None,
|
||||||
animation_easing: Optional[
|
animation_easing: Optional[
|
||||||
@ -153,39 +186,10 @@ class Radar(Recharts):
|
|||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
on_animation_end: Optional[
|
||||||
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
|
||||||
on_context_menu: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_animation_start: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
|
||||||
] = None,
|
|
||||||
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
|
||||||
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
|
||||||
on_mouse_down: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
|
||||||
] = None,
|
|
||||||
on_mouse_enter: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
|
||||||
] = None,
|
|
||||||
on_mouse_leave: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
|
||||||
] = None,
|
|
||||||
on_mouse_move: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
|
||||||
] = None,
|
|
||||||
on_mouse_out: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
|
||||||
] = None,
|
|
||||||
on_mouse_over: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
|
||||||
] = None,
|
|
||||||
on_mouse_up: 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]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
@ -196,15 +200,16 @@ class Radar(Recharts):
|
|||||||
*children: The children of the component.
|
*children: The children of the component.
|
||||||
data_key: The key of a group of data which should be unique in a radar chart.
|
data_key: The key of a group of data which should be unique in a radar chart.
|
||||||
points: The coordinates of all the vertexes of the radar shape, like [{ x, y }].
|
points: The coordinates of all the vertexes of the radar shape, like [{ x, y }].
|
||||||
dot: If false set, dots will not be drawn
|
dot: If false set, dots will not be drawn. Default: True
|
||||||
stroke: Stoke color
|
stroke: Stoke color. Default: rx.color("accent", 9)
|
||||||
fill: Fill color
|
fill: Fill color. Default: rx.color("accent", 3)
|
||||||
fill_opacity: opacity
|
fill_opacity: opacity. Default: 0.6
|
||||||
legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered.
|
legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. Default: "rect"
|
||||||
label: If false set, labels will not be drawn
|
label: If false set, labels will not be drawn. Default: True
|
||||||
animation_begin: Specifies when the animation should begin, the unit of this option is ms.
|
is_animation_active: If set false, animation of polygon will be disabled. Default: True in CSR, and False in SSR
|
||||||
animation_duration: Specifies the duration of animation, the unit of this option is ms.
|
animation_begin: Specifies when the animation should begin, the unit of this option is ms. Default: 0
|
||||||
animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'
|
animation_duration: Specifies the duration of animation, the unit of this option is ms. Default: 1500
|
||||||
|
animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. Default: "ease"
|
||||||
style: The style of the component.
|
style: The style of the component.
|
||||||
key: A unique key for the component.
|
key: A unique key for the component.
|
||||||
id: The id for the component.
|
id: The id for the component.
|
||||||
|
Loading…
Reference in New Issue
Block a user