Skip to content

Commit

Permalink
default props comment for Scatter (#4118)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosabadia authored and simon committed Oct 23, 2024
1 parent cfaf087 commit b8f51b6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 31 deletions.
29 changes: 13 additions & 16 deletions reflex/components/recharts/cartesian.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,46 +459,43 @@ class Scatter(Recharts):
# The source data, in which each element is an object.
data: Var[List[Dict[str, Any]]]

# 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'
# 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'. Default: "circle"
legend_type: Var[LiteralLegendType]

# The id of x-axis which is corresponding to the data.
# The id of x-axis which is corresponding to the data. Default: 0
x_axis_id: Var[Union[str, int]]

# The id of y-axis which is corresponding to the data.
# The id of y-axis which is corresponding to the data. Default: 0
y_axis_id: Var[Union[str, int]]

# The id of z-axis which is corresponding to the data.
z_axis_id: Var[str]
# The id of z-axis which is corresponding to the data. Default: 0
z_axis_id: Var[Union[str, int]]

# If false set, line will not be drawn. If true set, line will be drawn which have the props calculated internally.
# If false set, line will not be drawn. If true set, line will be drawn which have the props calculated internally. Default: False
line: Var[bool]

# If a string set, specified symbol will be used to show scatter item. 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye'
# If a string set, specified symbol will be used to show scatter item. 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye'. Default: "circle"
shape: Var[LiteralShape]

# If 'joint' set, line will generated by just jointing all the points. If 'fitting' set, line will be generated by fitting algorithm. 'joint' | 'fitting'
# If 'joint' set, line will generated by just jointing all the points. If 'fitting' set, line will be generated by fitting algorithm. 'joint' | 'fitting'. Default: "joint"
line_type: Var[LiteralLineType]

# The fill
# The fill color of the scatter. Default: rx.color("accent", 9)
fill: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))

# the name
name: Var[Union[str, int]]

# Valid children components.
_valid_children: List[str] = ["LabelList", "ErrorBar"]

# If set false, animation of bar will be disabled.
# If set false, animation of bar will be disabled. Default: True in CSR, False in SSR
is_animation_active: Var[bool]

# Specifies when the animation should begin, the unit of this option is ms, default 0.
# Specifies when the animation should begin, the unit of this option is ms. Default: 0
animation_begin: Var[int]

# Specifies the duration of animation, the unit of this option is ms, default 1500.
# Specifies the duration of animation, the unit of this option is ms. Default: 1500
animation_duration: Var[int]

# The type of easing function, default 'ease'
# The type of easing function. Default: "ease"
animation_easing: Var[LiteralAnimationEasing]

# The customized event handler of click on the component in this group
Expand Down
28 changes: 13 additions & 15 deletions reflex/components/recharts/cartesian.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ class Scatter(Recharts):
] = None,
x_axis_id: Optional[Union[Var[Union[int, str]], int, str]] = None,
y_axis_id: Optional[Union[Var[Union[int, str]], int, str]] = None,
z_axis_id: Optional[Union[Var[str], str]] = None,
z_axis_id: Optional[Union[Var[Union[int, str]], int, str]] = None,
line: Optional[Union[Var[bool], bool]] = None,
shape: Optional[
Union[
Expand All @@ -1355,7 +1355,6 @@ class Scatter(Recharts):
Union[Literal["fitting", "joint"], Var[Literal["fitting", "joint"]]]
] = None,
fill: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
name: Optional[Union[Var[Union[int, str]], int, str]] = None,
is_animation_active: Optional[Union[Var[bool], bool]] = None,
animation_begin: Optional[Union[Var[int], int]] = None,
animation_duration: Optional[Union[Var[int], int]] = None,
Expand Down Expand Up @@ -1413,19 +1412,18 @@ class Scatter(Recharts):
Args:
*children: The children of the component.
data: The source data, in which each element is an object.
legend_type: 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'
x_axis_id: The id of x-axis which is corresponding to the data.
y_axis_id: The id of y-axis which is corresponding to the data.
z_axis_id: The id of z-axis which is corresponding to the data.
line: If false set, line will not be drawn. If true set, line will be drawn which have the props calculated internally.
shape: If a string set, specified symbol will be used to show scatter item. 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye'
line_type: If 'joint' set, line will generated by just jointing all the points. If 'fitting' set, line will be generated by fitting algorithm. 'joint' | 'fitting'
fill: The fill
name: the name
is_animation_active: If set false, animation of bar will be disabled.
animation_begin: Specifies when the animation should begin, the unit of this option is ms, default 0.
animation_duration: Specifies the duration of animation, the unit of this option is ms, default 1500.
animation_easing: The type of easing function, default 'ease'
legend_type: 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'. Default: "circle"
x_axis_id: The id of x-axis which is corresponding to the data. Default: 0
y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
z_axis_id: The id of z-axis which is corresponding to the data. Default: 0
line: If false set, line will not be drawn. If true set, line will be drawn which have the props calculated internally. Default: False
shape: If a string set, specified symbol will be used to show scatter item. 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye'. Default: "circle"
line_type: If 'joint' set, line will generated by just jointing all the points. If 'fitting' set, line will be generated by fitting algorithm. 'joint' | 'fitting'. Default: "joint"
fill: The fill color of the scatter. Default: rx.color("accent", 9)
is_animation_active: If set false, animation of bar will be disabled. Default: True in CSR, False in SSR
animation_begin: Specifies when the animation should begin, the unit of this option is ms. Default: 0
animation_duration: Specifies the duration of animation, the unit of this option is ms. Default: 1500
animation_easing: The type of easing function. Default: "ease"
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
Expand Down

0 comments on commit b8f51b6

Please sign in to comment.