Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default props comment for Line #4117

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions reflex/components/recharts/cartesian.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,32 +408,32 @@ class Line(Cartesian):
# The interpolation type of line. And customized interpolation function can be set to type. It's the same as type in Area.
type_: Var[LiteralAreaType]

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

# The width of the line stroke.
# The width of the line stroke. Default: 1
stroke_width: Var[int]

# 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.
# 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)}
dot: Var[Union[bool, Dict[str, Any]]] = LiteralVar.create(
{
"stroke": Color("accent", 10),
"fill": Color("accent", 4),
}
)

# 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.
# 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)}
active_dot: Var[Union[bool, Dict[str, Any]]] = LiteralVar.create(
{
"stroke": Color("accent", 2),
"fill": Color("accent", 10),
}
)

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

# Hides the line when true, useful when toggling visibility state via legend.
# Hides the line when true, useful when toggling visibility state via legend. Default: False
hide: Var[bool]

# Whether to connect a graph line across null points.
Expand All @@ -442,8 +442,11 @@ class Line(Cartesian):
# The unit of data. This option will be used in tooltip.
unit: Var[Union[str, int]]

# The name of data displayed in the axis. This option will be used to represent an index in a scatter chart.
name: Var[Union[str, int]]
# The coordinates of all the points in the line, usually calculated internally.
points: Var[List[Dict[str, Any]]]

# The pattern of dashes and gaps used to paint the line.
stroke_dasharray: Var[str]

# Valid children components
_valid_children: List[str] = ["LabelList", "ErrorBar"]
Expand Down
18 changes: 10 additions & 8 deletions reflex/components/recharts/cartesian.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,8 @@ class Line(Cartesian):
hide: Optional[Union[Var[bool], bool]] = None,
connect_nulls: Optional[Union[Var[bool], bool]] = None,
unit: Optional[Union[Var[Union[int, str]], int, str]] = None,
name: Optional[Union[Var[Union[int, str]], int, str]] = None,
points: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
stroke_dasharray: Optional[Union[Var[str], str]] = None,
layout: Optional[
Union[
Literal["horizontal", "vertical"],
Expand Down Expand Up @@ -1263,15 +1264,16 @@ class Line(Cartesian):
Args:
*children: The children of the component.
type_: The interpolation type of line. And customized interpolation function can be set to type. It's the same as type in Area.
stroke: The color of the line stroke.
stroke_width: The width of the line stroke.
dot: 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.
active_dot: 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.
label: If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally.
hide: Hides the line when true, useful when toggling visibility state via legend.
stroke: The color of the line stroke. Default: rx.color("accent", 9)
stroke_width: The width of the line stroke. Default: 1
dot: 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)}
active_dot: 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)}
label: If false set, labels will not be drawn. If true set, labels will be drawn which have the props calculated internally. Default: False
hide: Hides the line when true, useful when toggling visibility state via legend. Default: False
connect_nulls: Whether to connect a graph line across null points.
unit: The unit of data. This option will be used in tooltip.
name: The name of data displayed in the axis. This option will be used to represent an index in a scatter chart.
points: The coordinates of all the points in the line, usually calculated internally.
stroke_dasharray: The pattern of dashes and gaps used to paint the line.
layout: The layout of bar in the chart, usually inherited from parent. 'horizontal' | 'vertical'
data_key: The key of a group of data which should be unique in an area chart.
x_axis_id: The id of x-axis which is corresponding to the data.
Expand Down
Loading