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 GraphinTooltip #4101

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
33 changes: 16 additions & 17 deletions reflex/components/recharts/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,16 @@ class GraphingTooltip(Recharts):

alias = "RechartsTooltip"

# The separator between name and value.
# The separator between name and value. Default: ":"
separator: Var[str]

# The offset size of tooltip. Number
# The offset size of tooltip. Number. Default: 10
offset: Var[int]

# When an item of the payload has value null or undefined, this item won't be displayed.
# When an item of the payload has value null or undefined, this item won't be displayed. Default: True
filter_null: Var[bool]

# If set false, no cursor will be drawn when tooltip is active.
# If set false, no cursor will be drawn when tooltip is active. Default: {"strokeWidth": 1, "fill": rx.color("gray", 3)}
cursor: Var[Union[Dict[str, Any], bool]] = LiteralVar.create(
{
"strokeWidth": 1,
Expand All @@ -149,16 +149,17 @@ class GraphingTooltip(Recharts):
# The box of viewing area, which has the shape of {x: someVal, y: someVal, width: someVal, height: someVal}, usually calculated internally.
view_box: Var[Dict[str, Any]]

# The style of default tooltip content item which is a li element. DEFAULT: {}
# The style of default tooltip content item which is a li element. Default: {"color": rx.color("gray", 12)}
item_style: Var[Dict[str, Any]] = LiteralVar.create(
{
"color": Color("gray", 12),
}
)

# The style of tooltip wrapper which is a dom element. DEFAULT: {}
# The style of tooltip wrapper which is a dom element. Default: {}
wrapper_style: Var[Dict[str, Any]]
# The style of tooltip content which is a dom element. DEFAULT: {}

# The style of tooltip content which is a dom element. Default: {"background": rx.color("gray", 1), "borderColor": rx.color("gray", 4), "borderRadius": "8px"}
content_style: Var[Dict[str, Any]] = LiteralVar.create(
{
"background": Color("gray", 1),
Expand All @@ -167,30 +168,28 @@ class GraphingTooltip(Recharts):
}
)

# The style of default tooltip label which is a p element. DEFAULT: {}
# The style of default tooltip label which is a p element. Default: {"color": rx.color("gray", 11)}
label_style: Var[Dict[str, Any]] = LiteralVar.create({"color": Color("gray", 11)})

# This option allows the tooltip to extend beyond the viewBox of the chart itself. DEFAULT: { x: false, y: false }
allow_escape_view_box: Var[Dict[str, bool]] = LiteralVar.create(
{"x": False, "y": False}
)
# This option allows the tooltip to extend beyond the viewBox of the chart itself. Default: {"x": False, "y": False}
allow_escape_view_box: Var[Dict[str, bool]]

# If set true, the tooltip is displayed. If set false, the tooltip is hidden, usually calculated internally.
# If set true, the tooltip is displayed. If set false, the tooltip is hidden, usually calculated internally. Default: False
active: Var[bool]

# If this field is set, the tooltip position will be fixed and will not move anymore.
position: Var[Dict[str, Any]]

# The coordinate of tooltip which is usually calculated internally.
# The coordinate of tooltip which is usually calculated internally. Default: {"x": 0, "y": 0}
coordinate: Var[Dict[str, Any]]

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

# 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]


Expand Down
28 changes: 14 additions & 14 deletions reflex/components/recharts/general.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -301,22 +301,22 @@ class GraphingTooltip(Recharts):

Args:
*children: The children of the component.
separator: The separator between name and value.
offset: The offset size of tooltip. Number
filter_null: When an item of the payload has value null or undefined, this item won't be displayed.
cursor: If set false, no cursor will be drawn when tooltip is active.
separator: The separator between name and value. Default: ":"
offset: The offset size of tooltip. Number. Default: 10
filter_null: When an item of the payload has value null or undefined, this item won't be displayed. Default: True
cursor: If set false, no cursor will be drawn when tooltip is active. Default: {"strokeWidth": 1, "fill": rx.color("gray", 3)}
view_box: The box of viewing area, which has the shape of {x: someVal, y: someVal, width: someVal, height: someVal}, usually calculated internally.
item_style: The style of default tooltip content item which is a li element. DEFAULT: {}
wrapper_style: The style of tooltip wrapper which is a dom element. DEFAULT: {}
content_style: The style of tooltip content which is a dom element. DEFAULT: {}
label_style: The style of default tooltip label which is a p element. DEFAULT: {}
allow_escape_view_box: This option allows the tooltip to extend beyond the viewBox of the chart itself. DEFAULT: { x: false, y: false }
active: If set true, the tooltip is displayed. If set false, the tooltip is hidden, usually calculated internally.
item_style: The style of default tooltip content item which is a li element. Default: {"color": rx.color("gray", 12)}
wrapper_style: The style of tooltip wrapper which is a dom element. Default: {}
content_style: The style of tooltip content which is a dom element. Default: {"background": rx.color("gray", 1), "borderColor": rx.color("gray", 4), "borderRadius": "8px"}
label_style: The style of default tooltip label which is a p element. Default: {"color": rx.color("gray", 11)}
allow_escape_view_box: This option allows the tooltip to extend beyond the viewBox of the chart itself. Default: {"x": False, "y": False}
active: If set true, the tooltip is displayed. If set false, the tooltip is hidden, usually calculated internally. Default: False
position: If this field is set, the tooltip position will be fixed and will not move anymore.
coordinate: The coordinate of tooltip which is usually calculated internally.
is_animation_active: If set false, animation of tooltip 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. DEFAULT: 1500
animation_easing: The type of easing function. DEFAULT: 'ease'
coordinate: The coordinate of tooltip which is usually calculated internally. Default: {"x": 0, "y": 0}
is_animation_active: If set false, animation of tooltip 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. 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
Loading