default props comment for barchart (#4092)

This commit is contained in:
Carlos 2024-10-09 01:42:41 +02:00 committed by GitHub
parent 1bf8c7728e
commit 068b3bab42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 10 deletions

View File

@ -9,7 +9,7 @@ from reflex.components.recharts.general import ResponsiveContainer
from reflex.constants import EventTriggers from reflex.constants import EventTriggers
from reflex.constants.colors import Color from reflex.constants.colors import Color
from reflex.event import EventHandler from reflex.event import EventHandler
from reflex.vars.base import LiteralVar, Var from reflex.vars.base import Var
from .recharts import ( from .recharts import (
LiteralAnimationEasing, LiteralAnimationEasing,
@ -155,11 +155,11 @@ class BarChart(CategoricalChartBase):
alias = "RechartsBarChart" alias = "RechartsBarChart"
# The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number # The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number. Default: "10%"
bar_category_gap: Var[Union[str, int]] = LiteralVar.create("10%") bar_category_gap: Var[Union[str, int]]
# The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number # The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number. Default: 4
bar_gap: Var[Union[str, int]] = LiteralVar.create(4) # type: ignore bar_gap: Var[Union[str, int]]
# The width of all the bars in the chart. Number # The width of all the bars in the chart. Number
bar_size: Var[int] bar_size: Var[int]
@ -167,10 +167,10 @@ class BarChart(CategoricalChartBase):
# The maximum width of all the bars in a horizontal BarChart, or maximum height in a vertical BarChart. # The maximum width of all the bars in a horizontal BarChart, or maximum height in a vertical BarChart.
max_bar_size: Var[int] max_bar_size: Var[int]
# The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. # The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. Default: "none"
stack_offset: Var[LiteralStackOffset] stack_offset: Var[LiteralStackOffset]
# If false set, stacked items will be rendered left to right. If true set, stacked items will be rendered right to left. (Render direction affects SVG layering, not x position.) # If false set, stacked items will be rendered left to right. If true set, stacked items will be rendered right to left. (Render direction affects SVG layering, not x position.) Default: False
reverse_stack_order: Var[bool] reverse_stack_order: Var[bool]
# Valid children components # Valid children components

View File

@ -358,12 +358,12 @@ class BarChart(CategoricalChartBase):
Args: Args:
*children: The children of the chart component. *children: The children of the chart component.
bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number bar_category_gap: The gap between two bar categories, which can be a percent value or a fixed value. Percentage | Number. Default: "10%"
bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number bar_gap: The gap between two bars in the same category, which can be a percent value or a fixed value. Percentage | Number. Default: 4
bar_size: The width of all the bars in the chart. Number bar_size: The width of all the bars in the chart. Number
max_bar_size: The maximum width of all the bars in a horizontal BarChart, or maximum height in a vertical BarChart. max_bar_size: The maximum width of all the bars in a horizontal BarChart, or maximum height in a vertical BarChart.
stack_offset: The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. 'expand' | 'none' | 'wiggle' | 'silhouette' stack_offset: The type of offset function used to generate the lower and upper values in the series array. The four types are built-in offsets in d3-shape. 'expand' | 'none' | 'wiggle' | 'silhouette'
reverse_stack_order: If false set, stacked items will be rendered left to right. If true set, stacked items will be rendered right to left. (Render direction affects SVG layering, not x position.) reverse_stack_order: If false set, stacked items will be rendered left to right. If true set, stacked items will be rendered right to left. (Render direction affects SVG layering, not x position.) Default: False
data: The source data, in which each element is an object. data: The source data, in which each element is an object.
margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}. margin: The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
sync_id: If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush. sync_id: If any two categorical charts(rx.line_chart, rx.area_chart, rx.bar_chart, rx.composed_chart) have the same sync_id, these two charts can sync the position GraphingTooltip, and the start_index, end_index of Brush.