Skip to content

Commit

Permalink
default props comment for treemap (#4098)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosabadia authored Oct 8, 2024
1 parent f05da7c commit 9f11b83
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
17 changes: 10 additions & 7 deletions reflex/components/recharts/charts.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,31 +457,34 @@ class Treemap(RechartsCharts):

alias = "RechartsTreemap"

# The width of chart container. String or Integer
# The width of chart container. String or Integer. Default: "100%"
width: Var[Union[str, int]] = "100%" # type: ignore

# The height of chart container.
# The height of chart container. String or Integer. Default: "100%"
height: Var[Union[str, int]] = "100%" # type: ignore

# data of treemap. Array
data: Var[List[Dict[str, Any]]]

# The key of a group of data which should be unique in a treemap. String | Number | Function
# The key of a group of data which should be unique in a treemap. String | Number. Default: "value"
data_key: Var[Union[str, int]]

# The key of each sector's name. String. Default: "name"
name_key: Var[str]

# The treemap will try to keep every single rectangle's aspect ratio near the aspectRatio given. Number
aspect_ratio: Var[int]

# If set false, animation of area will be disabled.
# If set false, animation of area will be disabled. Default: True
is_animation_active: Var[bool]

# Specifies when the animation should begin, the unit of this option is ms.
# 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.
# Specifies the duration of animation, the unit of this option is ms. Default: 1500
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]

# The customized event handler of animation start
Expand Down
16 changes: 9 additions & 7 deletions reflex/components/recharts/charts.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,7 @@ class Treemap(RechartsCharts):
height: Optional[Union[Var[Union[int, str]], int, str]] = None,
data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
data_key: Optional[Union[Var[Union[int, str]], int, str]] = None,
name_key: Optional[Union[Var[str], str]] = None,
aspect_ratio: Optional[Union[Var[int], int]] = None,
is_animation_active: Optional[Union[Var[bool], bool]] = None,
animation_begin: Optional[Union[Var[int], int]] = None,
Expand Down Expand Up @@ -1020,15 +1021,16 @@ class Treemap(RechartsCharts):
Args:
*children: The children of the chart component.
width: The width of chart container. String or Integer
height: The height of chart container.
width: The width of chart container. String or Integer. Default: "100%"
height: The height of chart container. String or Integer. Default: "100%"
data: data of treemap. Array
data_key: The key of a group of data which should be unique in a treemap. String | Number | Function
data_key: The key of a group of data which should be unique in a treemap. String | Number. Default: "value"
name_key: The key of each sector's name. String. Default: "name"
aspect_ratio: The treemap will try to keep every single rectangle's aspect ratio near the aspectRatio given. Number
is_animation_active: If set false, animation of area will be disabled.
animation_begin: Specifies when the animation should begin, the unit of this option is ms.
animation_duration: Specifies the duration of animation, the unit of this option is ms.
animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'
is_animation_active: If set false, animation of area will be disabled. Default: True
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. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'. 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 9f11b83

Please sign in to comment.