merging
This commit is contained in:
commit
63f13769ea
@ -612,19 +612,19 @@ class ErrorBar(Recharts):
|
|||||||
class Reference(Recharts):
|
class Reference(Recharts):
|
||||||
"""A base class for reference components in Reference."""
|
"""A base class for reference components in Reference."""
|
||||||
|
|
||||||
# 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]]
|
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]]
|
y_axis_id: Var[Union[str, int]]
|
||||||
|
|
||||||
# Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas.
|
# Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas. Default: "discard"
|
||||||
if_overflow: Var[LiteralIfOverflow]
|
if_overflow: Var[LiteralIfOverflow]
|
||||||
|
|
||||||
# If set a string or a number, default label will be drawn, and the option is content.
|
# If set a string or a number, default label will be drawn, and the option is content.
|
||||||
label: Var[Union[str, int]]
|
label: Var[Union[str, int]]
|
||||||
|
|
||||||
# If set true, the line will be rendered in front of bars in BarChart, etc.
|
# If set true, the line will be rendered in front of bars in BarChart, etc. Default: False
|
||||||
is_front: Var[bool]
|
is_front: Var[bool]
|
||||||
|
|
||||||
|
|
||||||
|
@ -1697,11 +1697,11 @@ class Reference(Recharts):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
*children: The children of the component.
|
*children: The children of the component.
|
||||||
x_axis_id: The id of x-axis which is corresponding to the data.
|
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.
|
y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
|
||||||
if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas.
|
if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas. Default: "discard"
|
||||||
label: If set a string or a number, default label will be drawn, and the option is content.
|
label: If set a string or a number, default label will be drawn, and the option is content.
|
||||||
is_front: If set true, the line will be rendered in front of bars in BarChart, etc.
|
is_front: If set true, the line will be rendered in front of bars in BarChart, etc. Default: False
|
||||||
style: The style of the component.
|
style: The style of the component.
|
||||||
key: A unique key for the component.
|
key: A unique key for the component.
|
||||||
id: The id for the component.
|
id: The id for the component.
|
||||||
@ -1788,11 +1788,11 @@ class ReferenceLine(Reference):
|
|||||||
stroke: The color of the reference line.
|
stroke: The color of the reference line.
|
||||||
stroke_width: The width of the stroke. Default: 1
|
stroke_width: The width of the stroke. Default: 1
|
||||||
segment: Array of endpoints in { x, y } format. These endpoints would be used to draw the ReferenceLine.
|
segment: Array of endpoints in { x, y } format. These endpoints would be used to draw the ReferenceLine.
|
||||||
x_axis_id: The id of x-axis which is corresponding to the data.
|
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.
|
y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
|
||||||
if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas.
|
if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas. Default: "discard"
|
||||||
label: If set a string or a number, default label will be drawn, and the option is content.
|
label: If set a string or a number, default label will be drawn, and the option is content.
|
||||||
is_front: If set true, the line will be rendered in front of bars in BarChart, etc.
|
is_front: If set true, the line will be rendered in front of bars in BarChart, etc. Default: False
|
||||||
style: The style of the component.
|
style: The style of the component.
|
||||||
key: A unique key for the component.
|
key: A unique key for the component.
|
||||||
id: The id for the component.
|
id: The id for the component.
|
||||||
@ -1879,11 +1879,11 @@ class ReferenceDot(Reference):
|
|||||||
r: The radius of dot.
|
r: The radius of dot.
|
||||||
fill: The color of the area fill.
|
fill: The color of the area fill.
|
||||||
stroke: The color of the line stroke.
|
stroke: The color of the line stroke.
|
||||||
x_axis_id: The id of x-axis which is corresponding to the data.
|
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.
|
y_axis_id: The id of y-axis which is corresponding to the data. Default: 0
|
||||||
if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas.
|
if_overflow: Defines how to draw the reference line if it falls partly outside the canvas. If set to 'discard', the reference line will not be drawn at all. If set to 'hidden', the reference line will be clipped to the canvas. If set to 'visible', the reference line will be drawn completely. If set to 'extendDomain', the domain of the overflown axis will be extended such that the reference line fits into the canvas. Default: "discard"
|
||||||
label: If set a string or a number, default label will be drawn, and the option is content.
|
label: If set a string or a number, default label will be drawn, and the option is content.
|
||||||
is_front: If set true, the line will be rendered in front of bars in BarChart, etc.
|
is_front: If set true, the line will be rendered in front of bars in BarChart, etc. Default: False
|
||||||
style: The style of the component.
|
style: The style of the component.
|
||||||
key: A unique key for the component.
|
key: A unique key for the component.
|
||||||
id: The id for the component.
|
id: The id for the component.
|
||||||
|
@ -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, empty_event
|
from reflex.event import EventHandler, empty_event
|
||||||
from reflex.vars.base import LiteralVar, Var
|
from reflex.vars.base import Var
|
||||||
|
|
||||||
from .recharts import (
|
from .recharts import (
|
||||||
LiteralAnimationEasing,
|
LiteralAnimationEasing,
|
||||||
@ -112,10 +112,10 @@ class CategoricalChartBase(ChartBase):
|
|||||||
# 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.
|
# 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: Var[str]
|
sync_id: Var[str]
|
||||||
|
|
||||||
# When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
|
# When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function. Default: "index"
|
||||||
sync_method: Var[LiteralSyncMethod]
|
sync_method: Var[LiteralSyncMethod]
|
||||||
|
|
||||||
# The layout of area in the chart. 'horizontal' | 'vertical'
|
# The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
|
||||||
layout: Var[LiteralLayout]
|
layout: Var[LiteralLayout]
|
||||||
|
|
||||||
# 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'
|
# 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'
|
||||||
@ -129,7 +129,7 @@ class AreaChart(CategoricalChartBase):
|
|||||||
|
|
||||||
alias = "RechartsAreaChart"
|
alias = "RechartsAreaChart"
|
||||||
|
|
||||||
# The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'
|
# The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'. Default: "auto"
|
||||||
base_value: Var[Union[int, LiteralComposedChartBaseValue]]
|
base_value: Var[Union[int, LiteralComposedChartBaseValue]]
|
||||||
|
|
||||||
# Valid children components
|
# Valid children components
|
||||||
@ -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
|
||||||
@ -217,19 +217,19 @@ class ComposedChart(CategoricalChartBase):
|
|||||||
|
|
||||||
alias = "RechartsComposedChart"
|
alias = "RechartsComposedChart"
|
||||||
|
|
||||||
# The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'
|
# The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'. Default: "auto"
|
||||||
base_value: Var[Union[int, LiteralComposedChartBaseValue]]
|
base_value: Var[Union[int, LiteralComposedChartBaseValue]]
|
||||||
|
|
||||||
# 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]] # type: ignore
|
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. Default: 4
|
||||||
bar_gap: Var[Union[str, int]] # type: ignore
|
bar_gap: Var[int]
|
||||||
|
|
||||||
# The width of all the bars in the chart. Number
|
# The width or height of each bar. If the barSize is not specified, the size of the bar will be calculated by the barCategoryGap, barGap and the quantity of bar groups.
|
||||||
bar_size: Var[int]
|
bar_size: Var[int]
|
||||||
|
|
||||||
# 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
|
||||||
@ -292,25 +292,25 @@ class RadarChart(ChartBase):
|
|||||||
# The source data, in which each element is an object.
|
# The source data, in which each element is an object.
|
||||||
data: Var[List[Dict[str, Any]]]
|
data: Var[List[Dict[str, Any]]]
|
||||||
|
|
||||||
# The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
|
# The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}. Default: {"top": 0, "right": 0, "left": 0, "bottom": 0}
|
||||||
margin: Var[Dict[str, Any]]
|
margin: Var[Dict[str, Any]]
|
||||||
|
|
||||||
# The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage
|
# The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage. Default: "50%"
|
||||||
cx: Var[Union[int, str]]
|
cx: Var[Union[int, str]]
|
||||||
|
|
||||||
# The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage
|
# The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage. Default: "50%"
|
||||||
cy: Var[Union[int, str]]
|
cy: Var[Union[int, str]]
|
||||||
|
|
||||||
# The angle of first radial direction line.
|
# The angle of first radial direction line. Default: 90
|
||||||
start_angle: Var[int]
|
start_angle: Var[int]
|
||||||
|
|
||||||
# The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'.
|
# The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'. Default: -270
|
||||||
end_angle: Var[int]
|
end_angle: Var[int]
|
||||||
|
|
||||||
# The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
|
# The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: 0
|
||||||
inner_radius: Var[Union[int, str]]
|
inner_radius: Var[Union[int, str]]
|
||||||
|
|
||||||
# The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
|
# The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: "80%"
|
||||||
outer_radius: Var[Union[int, str]]
|
outer_radius: Var[Union[int, str]]
|
||||||
|
|
||||||
# Valid children components
|
# Valid children components
|
||||||
@ -346,31 +346,31 @@ class RadialBarChart(ChartBase):
|
|||||||
# The source data which each element is an object.
|
# The source data which each element is an object.
|
||||||
data: Var[List[Dict[str, Any]]]
|
data: Var[List[Dict[str, Any]]]
|
||||||
|
|
||||||
# The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
|
# The sizes of whitespace around the chart. Default: {"top": 5, "right": 5, "left": 5 "bottom": 5}
|
||||||
margin: Var[Dict[str, Any]]
|
margin: Var[Dict[str, Any]]
|
||||||
|
|
||||||
# The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage
|
# The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage. Default: "50%"
|
||||||
cx: Var[Union[int, str]]
|
cx: Var[Union[int, str]]
|
||||||
|
|
||||||
# The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage
|
# The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage. Default: "50%"
|
||||||
cy: Var[Union[int, str]]
|
cy: Var[Union[int, str]]
|
||||||
|
|
||||||
# The angle of first radial direction line.
|
# The angle of first radial direction line. Default: 0
|
||||||
start_angle: Var[int]
|
start_angle: Var[int]
|
||||||
|
|
||||||
# The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'.
|
# The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'. Default: 360
|
||||||
end_angle: Var[int]
|
end_angle: Var[int]
|
||||||
|
|
||||||
# The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
|
# The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: "30%"
|
||||||
inner_radius: Var[Union[int, str]]
|
inner_radius: Var[Union[int, str]]
|
||||||
|
|
||||||
# The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
|
# The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: "100%"
|
||||||
outer_radius: Var[Union[int, str]]
|
outer_radius: Var[Union[int, str]]
|
||||||
|
|
||||||
# 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[int, str]]
|
bar_category_gap: Var[Union[int, str]]
|
||||||
|
|
||||||
# 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[str]
|
bar_gap: Var[str]
|
||||||
|
|
||||||
# The size of each bar. If the barSize is not specified, the size of bar will be calculated by the barCategoryGap, barGap and the quantity of bar groups.
|
# The size of each bar. If the barSize is not specified, the size of bar will be calculated by the barCategoryGap, barGap and the quantity of bar groups.
|
||||||
@ -437,10 +437,10 @@ class FunnelChart(ChartBase):
|
|||||||
|
|
||||||
alias = "RechartsFunnelChart"
|
alias = "RechartsFunnelChart"
|
||||||
|
|
||||||
# The layout of bars in the chart. centeric
|
# The layout of bars in the chart. Default: "centric"
|
||||||
layout: Var[str]
|
layout: Var[str]
|
||||||
|
|
||||||
# The sizes of whitespace around the chart, i.e. {"top": 50, "right": 30, "left": 20, "bottom": 5}.
|
# The sizes of whitespace around the chart. Default: {"top": 5, "right": 5, "bottom": 5, "left": 5}
|
||||||
margin: Var[Dict[str, Any]]
|
margin: Var[Dict[str, Any]]
|
||||||
|
|
||||||
# The stroke color of each bar. String | Object
|
# The stroke color of each bar. String | Object
|
||||||
|
@ -160,8 +160,8 @@ class CategoricalChartBase(ChartBase):
|
|||||||
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.
|
||||||
sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
|
sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function. Default: "index"
|
||||||
layout: The layout of area in the chart. 'horizontal' | 'vertical'
|
layout: The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
|
||||||
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'
|
||||||
width: The width of chart container. String or Integer
|
width: The width of chart container. String or Integer
|
||||||
height: The height of chart container.
|
height: The height of chart container.
|
||||||
@ -258,12 +258,12 @@ class AreaChart(CategoricalChartBase):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
*children: The children of the chart component.
|
*children: The children of the chart component.
|
||||||
base_value: The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'
|
base_value: The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'. Default: "auto"
|
||||||
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.
|
||||||
sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
|
sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function. Default: "index"
|
||||||
layout: The layout of area in the chart. 'horizontal' | 'vertical'
|
layout: The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
|
||||||
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'
|
||||||
width: The width of chart container. String or Integer
|
width: The width of chart container. String or Integer
|
||||||
height: The height of chart container.
|
height: The height of chart container.
|
||||||
@ -358,17 +358,17 @@ 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.
|
||||||
sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
|
sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function. Default: "index"
|
||||||
layout: The layout of area in the chart. 'horizontal' | 'vertical'
|
layout: The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
|
||||||
width: The width of chart container. String or Integer
|
width: The width of chart container. String or Integer
|
||||||
height: The height of chart container.
|
height: The height of chart container.
|
||||||
style: The style of the component.
|
style: The style of the component.
|
||||||
@ -460,8 +460,8 @@ class LineChart(CategoricalChartBase):
|
|||||||
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.
|
||||||
sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
|
sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function. Default: "index"
|
||||||
layout: The layout of area in the chart. 'horizontal' | 'vertical'
|
layout: The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
|
||||||
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'
|
||||||
width: The width of chart container. String or Integer
|
width: The width of chart container. String or Integer
|
||||||
height: The height of chart container.
|
height: The height of chart container.
|
||||||
@ -492,7 +492,7 @@ class ComposedChart(CategoricalChartBase):
|
|||||||
]
|
]
|
||||||
] = None,
|
] = None,
|
||||||
bar_category_gap: Optional[Union[Var[Union[int, str]], int, str]] = None,
|
bar_category_gap: Optional[Union[Var[Union[int, str]], int, str]] = None,
|
||||||
bar_gap: Optional[Union[Var[Union[int, str]], int, str]] = None,
|
bar_gap: Optional[Union[Var[int], int]] = None,
|
||||||
bar_size: Optional[Union[Var[int], int]] = None,
|
bar_size: Optional[Union[Var[int], int]] = None,
|
||||||
reverse_stack_order: Optional[Union[Var[bool], bool]] = None,
|
reverse_stack_order: Optional[Union[Var[bool], bool]] = None,
|
||||||
data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
|
data: Optional[Union[List[Dict[str, Any]], Var[List[Dict[str, Any]]]]] = None,
|
||||||
@ -562,16 +562,16 @@ class ComposedChart(CategoricalChartBase):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
*children: The children of the chart component.
|
*children: The children of the chart component.
|
||||||
base_value: The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'
|
base_value: The base value of area. Number | 'dataMin' | 'dataMax' | 'auto'. Default: "auto"
|
||||||
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. Default: 4
|
||||||
bar_size: The width of all the bars in the chart. Number
|
bar_size: The width or height of each bar. If the barSize is not specified, the size of the bar will be calculated by the barCategoryGap, barGap and the quantity of bar groups.
|
||||||
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.
|
||||||
sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function
|
sync_method: When sync_id is provided, allows customisation of how the charts will synchronize GraphingTooltips and brushes. Using 'index' (default setting), other charts will reuse current datum's index within the data array. In cases where data does not have the same length, this might yield unexpected results. In that case use 'value' which will try to match other charts values, or a fully custom function which will receive tick, data as argument and should return an index. 'index' | 'value' | function. Default: "index"
|
||||||
layout: The layout of area in the chart. 'horizontal' | 'vertical'
|
layout: The layout of area in the chart. 'horizontal' | 'vertical'. Default: "horizontal"
|
||||||
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'
|
||||||
width: The width of chart container. String or Integer
|
width: The width of chart container. String or Integer
|
||||||
height: The height of chart container.
|
height: The height of chart container.
|
||||||
@ -697,13 +697,13 @@ class RadarChart(ChartBase):
|
|||||||
Args:
|
Args:
|
||||||
*children: The children of the chart component.
|
*children: The children of the chart component.
|
||||||
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}. Default: {"top": 0, "right": 0, "left": 0, "bottom": 0}
|
||||||
cx: The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage
|
cx: The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage. Default: "50%"
|
||||||
cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage
|
cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage. Default: "50%"
|
||||||
start_angle: The angle of first radial direction line.
|
start_angle: The angle of first radial direction line. Default: 90
|
||||||
end_angle: The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'.
|
end_angle: The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'. Default: -270
|
||||||
inner_radius: The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
|
inner_radius: The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: 0
|
||||||
outer_radius: The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
|
outer_radius: The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: "80%"
|
||||||
width: The width of chart container. String or Integer
|
width: The width of chart container. String or Integer
|
||||||
height: The height of chart container.
|
height: The height of chart container.
|
||||||
style: The style of the component.
|
style: The style of the component.
|
||||||
@ -786,15 +786,15 @@ class RadialBarChart(ChartBase):
|
|||||||
Args:
|
Args:
|
||||||
*children: The children of the chart component.
|
*children: The children of the chart component.
|
||||||
data: The source data which each element is an object.
|
data: The source data 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. Default: {"top": 5, "right": 5, "left": 5 "bottom": 5}
|
||||||
cx: The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage
|
cx: The The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of width. Number | Percentage. Default: "50%"
|
||||||
cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage
|
cy: The The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of height. Number | Percentage. Default: "50%"
|
||||||
start_angle: The angle of first radial direction line.
|
start_angle: The angle of first radial direction line. Default: 0
|
||||||
end_angle: The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'.
|
end_angle: The angle of last point in the circle which should be startAngle - 360 or startAngle + 360. We'll calculate the direction of chart by 'startAngle' and 'endAngle'. Default: 360
|
||||||
inner_radius: The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
|
inner_radius: The inner radius of first circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: "30%"
|
||||||
outer_radius: The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage
|
outer_radius: The outer radius of last circle grid. If set a percentage, the final value is obtained by multiplying the percentage of maxRadius which is calculated by the width, height, cx, cy. Number | Percentage. Default: "100%"
|
||||||
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 size of each bar. If the barSize is not specified, the size of bar will be calculated by the barCategoryGap, barGap and the quantity of bar groups.
|
bar_size: The size of each bar. If the barSize is not specified, the size of bar will be calculated by the barCategoryGap, barGap and the quantity of bar groups.
|
||||||
width: The width of chart container. String or Integer
|
width: The width of chart container. String or Integer
|
||||||
height: The height of chart container.
|
height: The height of chart container.
|
||||||
@ -929,8 +929,8 @@ class FunnelChart(ChartBase):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
*children: The children of the chart component.
|
*children: The children of the chart component.
|
||||||
layout: The layout of bars in the chart. centeric
|
layout: The layout of bars in the chart. Default: "centric"
|
||||||
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. Default: {"top": 5, "right": 5, "bottom": 5, "left": 5}
|
||||||
stroke: The stroke color of each bar. String | Object
|
stroke: The stroke color of each bar. String | Object
|
||||||
width: The width of chart container. String or Integer
|
width: The width of chart container. String or Integer
|
||||||
height: The height of chart container.
|
height: The height of chart container.
|
||||||
|
@ -106,36 +106,50 @@ class Radar(Recharts):
|
|||||||
# The coordinates of all the vertexes of the radar shape, like [{ x, y }].
|
# The coordinates of all the vertexes of the radar shape, like [{ x, y }].
|
||||||
points: Var[List[Dict[str, Any]]]
|
points: Var[List[Dict[str, Any]]]
|
||||||
|
|
||||||
# If false set, dots will not be drawn
|
# If false set, dots will not be drawn. Default: True
|
||||||
dot: Var[bool]
|
dot: Var[bool]
|
||||||
|
|
||||||
# Stoke color
|
# Stoke color. Default: rx.color("accent", 9)
|
||||||
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
|
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("accent", 9))
|
||||||
|
|
||||||
# Fill color
|
# Fill color. Default: rx.color("accent", 3)
|
||||||
fill: Var[str] = LiteralVar.create(Color("accent", 3))
|
fill: Var[str] = LiteralVar.create(Color("accent", 3))
|
||||||
|
|
||||||
# opacity
|
# opacity. Default: 0.6
|
||||||
fill_opacity: Var[float] = LiteralVar.create(0.6)
|
fill_opacity: Var[float] = LiteralVar.create(0.6)
|
||||||
|
|
||||||
# The type of icon in legend. If set to 'none', no legend item will be rendered.
|
# The type of icon in legend. If set to 'none', no legend item will be rendered. Default: "rect"
|
||||||
legend_type: Var[str]
|
legend_type: Var[LiteralLegendType]
|
||||||
|
|
||||||
# If false set, labels will not be drawn
|
# If false set, labels will not be drawn. Default: True
|
||||||
label: Var[bool]
|
label: Var[bool]
|
||||||
|
|
||||||
# Specifies when the animation should begin, the unit of this option is ms.
|
# If set false, animation of polygon will be disabled. Default: True in CSR, and False in SSR
|
||||||
|
is_animation_active: Var[bool]
|
||||||
|
|
||||||
|
# Specifies when the animation should begin, the unit of this option is ms. Default: 0
|
||||||
animation_begin: Var[int]
|
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]
|
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]
|
animation_easing: Var[LiteralAnimationEasing]
|
||||||
|
|
||||||
# Valid children components
|
# Valid children components
|
||||||
_valid_children: List[str] = ["LabelList"]
|
_valid_children: List[str] = ["LabelList"]
|
||||||
|
|
||||||
|
def get_event_triggers(self) -> dict[str, Union[Var, Any]]:
|
||||||
|
"""Get the event triggers that pass the component's value to the handler.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
A dict mapping the event trigger to the var that is passed to the handler.
|
||||||
|
"""
|
||||||
|
return {
|
||||||
|
EventTriggers.ON_ANIMATION_START: lambda: [],
|
||||||
|
EventTriggers.ON_ANIMATION_END: lambda: [],
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class RadialBar(Recharts):
|
class RadialBar(Recharts):
|
||||||
"""A RadialBar chart component in Recharts."""
|
"""A RadialBar chart component in Recharts."""
|
||||||
@ -270,17 +284,17 @@ class PolarGrid(Recharts):
|
|||||||
|
|
||||||
alias = "RechartsPolarGrid"
|
alias = "RechartsPolarGrid"
|
||||||
|
|
||||||
# The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container width.
|
# The x-coordinate of center.
|
||||||
cx: Var[Union[int, str]]
|
cx: Var[int]
|
||||||
|
|
||||||
# The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container height.
|
# The y-coordinate of center.
|
||||||
cy: Var[Union[int, str]]
|
cy: Var[int]
|
||||||
|
|
||||||
# The radius of the inner polar grid.
|
# The radius of the inner polar grid.
|
||||||
inner_radius: Var[Union[int, str]]
|
inner_radius: Var[int]
|
||||||
|
|
||||||
# The radius of the outer polar grid.
|
# The radius of the outer polar grid.
|
||||||
outer_radius: Var[Union[int, str]]
|
outer_radius: Var[int]
|
||||||
|
|
||||||
# The array of every line grid's angle.
|
# The array of every line grid's angle.
|
||||||
polar_angles: Var[List[int]]
|
polar_angles: Var[List[int]]
|
||||||
@ -288,10 +302,10 @@ class PolarGrid(Recharts):
|
|||||||
# The array of every line grid's radius.
|
# The array of every line grid's radius.
|
||||||
polar_radius: Var[List[int]]
|
polar_radius: Var[List[int]]
|
||||||
|
|
||||||
# The type of polar grids. 'polygon' | 'circle'
|
# The type of polar grids. 'polygon' | 'circle'. Default: "polygon"
|
||||||
grid_type: Var[LiteralGridType]
|
grid_type: Var[LiteralGridType]
|
||||||
|
|
||||||
# The stroke color of grid
|
# The stroke color of grid. Default: rx.color("gray", 10)
|
||||||
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 10))
|
stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 10))
|
||||||
|
|
||||||
# Valid children components
|
# Valid children components
|
||||||
|
@ -126,6 +126,7 @@ class Pie(Recharts):
|
|||||||
...
|
...
|
||||||
|
|
||||||
class Radar(Recharts):
|
class Radar(Recharts):
|
||||||
|
def get_event_triggers(self) -> dict[str, Union[Var, Any]]: ...
|
||||||
@overload
|
@overload
|
||||||
@classmethod
|
@classmethod
|
||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
@ -137,8 +138,40 @@ class Radar(Recharts):
|
|||||||
stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
|
stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None,
|
||||||
fill: Optional[Union[Var[str], str]] = None,
|
fill: Optional[Union[Var[str], str]] = None,
|
||||||
fill_opacity: Optional[Union[Var[float], float]] = None,
|
fill_opacity: Optional[Union[Var[float], float]] = None,
|
||||||
legend_type: Optional[Union[Var[str], str]] = None,
|
legend_type: Optional[
|
||||||
|
Union[
|
||||||
|
Literal[
|
||||||
|
"circle",
|
||||||
|
"cross",
|
||||||
|
"diamond",
|
||||||
|
"line",
|
||||||
|
"none",
|
||||||
|
"plainline",
|
||||||
|
"rect",
|
||||||
|
"square",
|
||||||
|
"star",
|
||||||
|
"triangle",
|
||||||
|
"wye",
|
||||||
|
],
|
||||||
|
Var[
|
||||||
|
Literal[
|
||||||
|
"circle",
|
||||||
|
"cross",
|
||||||
|
"diamond",
|
||||||
|
"line",
|
||||||
|
"none",
|
||||||
|
"plainline",
|
||||||
|
"rect",
|
||||||
|
"square",
|
||||||
|
"star",
|
||||||
|
"triangle",
|
||||||
|
"wye",
|
||||||
|
]
|
||||||
|
],
|
||||||
|
]
|
||||||
|
] = None,
|
||||||
label: Optional[Union[Var[bool], bool]] = None,
|
label: Optional[Union[Var[bool], bool]] = None,
|
||||||
|
is_animation_active: Optional[Union[Var[bool], bool]] = None,
|
||||||
animation_begin: Optional[Union[Var[int], int]] = None,
|
animation_begin: Optional[Union[Var[int], int]] = None,
|
||||||
animation_duration: Optional[Union[Var[int], int]] = None,
|
animation_duration: Optional[Union[Var[int], int]] = None,
|
||||||
animation_easing: Optional[
|
animation_easing: Optional[
|
||||||
@ -153,39 +186,10 @@ class Radar(Recharts):
|
|||||||
class_name: Optional[Any] = None,
|
class_name: Optional[Any] = None,
|
||||||
autofocus: Optional[bool] = None,
|
autofocus: Optional[bool] = None,
|
||||||
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
custom_attrs: Optional[Dict[str, Union[Var, str]]] = None,
|
||||||
on_blur: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
on_animation_end: Optional[
|
||||||
on_click: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
|
||||||
on_context_menu: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
on_double_click: Optional[
|
on_animation_start: Optional[
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
|
||||||
] = None,
|
|
||||||
on_focus: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
|
||||||
on_mount: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
|
||||||
on_mouse_down: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
|
||||||
] = None,
|
|
||||||
on_mouse_enter: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
|
||||||
] = None,
|
|
||||||
on_mouse_leave: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
|
||||||
] = None,
|
|
||||||
on_mouse_move: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
|
||||||
] = None,
|
|
||||||
on_mouse_out: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
|
||||||
] = None,
|
|
||||||
on_mouse_over: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
|
||||||
] = None,
|
|
||||||
on_mouse_up: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
|
||||||
] = None,
|
|
||||||
on_scroll: Optional[Union[EventHandler, EventSpec, list, Callable, Var]] = None,
|
|
||||||
on_unmount: Optional[
|
|
||||||
Union[EventHandler, EventSpec, list, Callable, Var]
|
Union[EventHandler, EventSpec, list, Callable, Var]
|
||||||
] = None,
|
] = None,
|
||||||
**props,
|
**props,
|
||||||
@ -196,15 +200,16 @@ class Radar(Recharts):
|
|||||||
*children: The children of the component.
|
*children: The children of the component.
|
||||||
data_key: The key of a group of data which should be unique in a radar chart.
|
data_key: The key of a group of data which should be unique in a radar chart.
|
||||||
points: The coordinates of all the vertexes of the radar shape, like [{ x, y }].
|
points: The coordinates of all the vertexes of the radar shape, like [{ x, y }].
|
||||||
dot: If false set, dots will not be drawn
|
dot: If false set, dots will not be drawn. Default: True
|
||||||
stroke: Stoke color
|
stroke: Stoke color. Default: rx.color("accent", 9)
|
||||||
fill: Fill color
|
fill: Fill color. Default: rx.color("accent", 3)
|
||||||
fill_opacity: opacity
|
fill_opacity: opacity. Default: 0.6
|
||||||
legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered.
|
legend_type: The type of icon in legend. If set to 'none', no legend item will be rendered. Default: "rect"
|
||||||
label: If false set, labels will not be drawn
|
label: If false set, labels will not be drawn. Default: True
|
||||||
animation_begin: Specifies when the animation should begin, the unit of this option is ms.
|
is_animation_active: If set false, animation of polygon 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.
|
animation_begin: Specifies when the animation should begin, the unit of this option is ms. Default: 0
|
||||||
animation_easing: The type of easing function. 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear'
|
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.
|
style: The style of the component.
|
||||||
key: A unique key for the component.
|
key: A unique key for the component.
|
||||||
id: The id for the component.
|
id: The id for the component.
|
||||||
@ -403,10 +408,10 @@ class PolarGrid(Recharts):
|
|||||||
def create( # type: ignore
|
def create( # type: ignore
|
||||||
cls,
|
cls,
|
||||||
*children,
|
*children,
|
||||||
cx: Optional[Union[Var[Union[int, str]], int, str]] = None,
|
cx: Optional[Union[Var[int], int]] = None,
|
||||||
cy: Optional[Union[Var[Union[int, str]], int, str]] = None,
|
cy: Optional[Union[Var[int], int]] = None,
|
||||||
inner_radius: Optional[Union[Var[Union[int, str]], int, str]] = None,
|
inner_radius: Optional[Union[Var[int], int]] = None,
|
||||||
outer_radius: Optional[Union[Var[Union[int, str]], int, str]] = None,
|
outer_radius: Optional[Union[Var[int], int]] = None,
|
||||||
polar_angles: Optional[Union[List[int], Var[List[int]]]] = None,
|
polar_angles: Optional[Union[List[int], Var[List[int]]]] = None,
|
||||||
polar_radius: Optional[Union[List[int], Var[List[int]]]] = None,
|
polar_radius: Optional[Union[List[int], Var[List[int]]]] = None,
|
||||||
grid_type: Optional[
|
grid_type: Optional[
|
||||||
@ -460,14 +465,14 @@ class PolarGrid(Recharts):
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
*children: The children of the component.
|
*children: The children of the component.
|
||||||
cx: The x-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container width.
|
cx: The x-coordinate of center.
|
||||||
cy: The y-coordinate of center. If set a percentage, the final value is obtained by multiplying the percentage of container height.
|
cy: The y-coordinate of center.
|
||||||
inner_radius: The radius of the inner polar grid.
|
inner_radius: The radius of the inner polar grid.
|
||||||
outer_radius: The radius of the outer polar grid.
|
outer_radius: The radius of the outer polar grid.
|
||||||
polar_angles: The array of every line grid's angle.
|
polar_angles: The array of every line grid's angle.
|
||||||
polar_radius: The array of every line grid's radius.
|
polar_radius: The array of every line grid's radius.
|
||||||
grid_type: The type of polar grids. 'polygon' | 'circle'
|
grid_type: The type of polar grids. 'polygon' | 'circle'. Default: "polygon"
|
||||||
stroke: The stroke color of grid
|
stroke: The stroke color of grid. Default: rx.color("gray", 10)
|
||||||
style: The style of the component.
|
style: The style of the component.
|
||||||
key: A unique key for the component.
|
key: A unique key for the component.
|
||||||
id: The id for the component.
|
id: The id for the component.
|
||||||
|
Loading…
Reference in New Issue
Block a user