From 6ad5a67b447a0d095390bd8935c56d828fad0862 Mon Sep 17 00:00:00 2001 From: carlosabadia Date: Tue, 8 Oct 2024 13:43:04 +0200 Subject: [PATCH 1/2] default props comment for Axis --- reflex/components/recharts/cartesian.py | 40 +++-- reflex/components/recharts/cartesian.pyi | 180 +++++++++++++++++------ reflex/components/recharts/recharts.py | 4 + reflex/components/recharts/recharts.pyi | 4 + 4 files changed, 165 insertions(+), 63 deletions(-) diff --git a/reflex/components/recharts/cartesian.py b/reflex/components/recharts/cartesian.py index 06ca80dc5f..e072f7da8d 100644 --- a/reflex/components/recharts/cartesian.py +++ b/reflex/components/recharts/cartesian.py @@ -15,6 +15,7 @@ LiteralDirection, LiteralIfOverflow, LiteralInterval, + LiteralIntervalAxis, LiteralLayout, LiteralLegendType, LiteralLineType, @@ -24,6 +25,7 @@ LiteralPolarRadiusType, LiteralScale, LiteralShape, + LiteralTextAnchor, Recharts, ) @@ -34,7 +36,7 @@ class Axis(Recharts): # The key of data displayed in the axis. data_key: Var[Union[str, int]] - # If set true, the axis do not display in the chart. + # If set true, the axis do not display in the chart. Default: False hide: Var[bool] # The width of axis which is usually calculated internally. @@ -46,28 +48,34 @@ class Axis(Recharts): # The type of axis 'number' | 'category' type_: Var[LiteralPolarRadiusType] - # Allow the ticks of XAxis to be decimals or not. + # If set 0, all the ticks will be shown. If set preserveStart", "preserveEnd" or "preserveStartEnd", the ticks which is to be shown or hidden will be calculated automatically. Default: "preserveEnd" + interval: Var[Union[LiteralIntervalAxis, int]] + + # Allow the ticks of Axis to be decimals or not. Default: True allow_decimals: Var[bool] - # When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. + # When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. Default: False allow_data_overflow: Var[bool] - # Allow the axis has duplicated categorys or not when the type of axis is "category". + # Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True allow_duplicated_category: Var[bool] - # If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line. + # The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"] + domain: Var[List] + + # If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line. Default: True axis_line: Var[bool] - # If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. + # If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False mirror: Var[bool] - # Reverse the ticks or not. + # Reverse the ticks or not. Default: False reversed: Var[bool] # The label of axis, which appears next to the axis. label: Var[Union[str, int, Dict[str, Any]]] - # If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold' | Function + # If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto" scale: Var[LiteralScale] # The unit of data displayed in the axis. This option will be used to represent an index unit in a scatter chart. @@ -82,23 +90,23 @@ class Axis(Recharts): # If set false, no ticks will be drawn. tick: Var[bool] - # The count of axis ticks. + # The count of axis ticks. Not used if 'type' is 'category'. Default: 5 tick_count: Var[int] - # If set false, no axis tick lines will be drawn. - tick_line: Var[bool] = LiteralVar.create(False) + # If set false, no axis tick lines will be drawn. Default: True + tick_line: Var[bool] - # The length of tick line. + # The length of tick line. Default: 6 tick_size: Var[int] - # The minimum gap between two adjacent labels + # The minimum gap between two adjacent labels. Default: 5 min_tick_gap: Var[int] - # The stroke color of axis + # The stroke color of axis. Default: rx.color("gray", 9) stroke: Var[Union[str, Color]] = LiteralVar.create(Color("gray", 9)) - # The text anchor of axis - text_anchor: Var[str] # 'start', 'middle', 'end' + # The text anchor of axis. Default: "middle" + text_anchor: Var[LiteralTextAnchor] # The customized event handler of click on the ticks of this axis on_click: EventHandler[lambda: []] diff --git a/reflex/components/recharts/cartesian.pyi b/reflex/components/recharts/cartesian.pyi index e7b186f6fd..83a785e8b2 100644 --- a/reflex/components/recharts/cartesian.pyi +++ b/reflex/components/recharts/cartesian.pyi @@ -27,9 +27,32 @@ class Axis(Recharts): type_: Optional[ Union[Literal["category", "number"], Var[Literal["category", "number"]]] ] = None, + interval: Optional[ + Union[ + Literal[ + "equidistantPreserveStart", + "preserveEnd", + "preserveStart", + "preserveStartEnd", + ], + Var[ + Union[ + Literal[ + "equidistantPreserveStart", + "preserveEnd", + "preserveStart", + "preserveStartEnd", + ], + int, + ] + ], + int, + ] + ] = None, allow_decimals: Optional[Union[Var[bool], bool]] = None, allow_data_overflow: Optional[Union[Var[bool], bool]] = None, allow_duplicated_category: Optional[Union[Var[bool], bool]] = None, + domain: Optional[Union[List, Var[List]]] = None, axis_line: Optional[Union[Var[bool], bool]] = None, mirror: Optional[Union[Var[bool], bool]] = None, reversed: Optional[Union[Var[bool], bool]] = None, @@ -87,7 +110,12 @@ class Axis(Recharts): tick_size: Optional[Union[Var[int], int]] = None, min_tick_gap: Optional[Union[Var[int], int]] = None, stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None, - text_anchor: Optional[Union[Var[str], str]] = None, + text_anchor: Optional[ + Union[ + Literal["end", "middle", "start"], + Var[Literal["end", "middle", "start"]], + ] + ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -136,28 +164,30 @@ class Axis(Recharts): Args: *children: The children of the component. data_key: The key of data displayed in the axis. - hide: If set true, the axis do not display in the chart. + hide: If set true, the axis do not display in the chart. Default: False width: The width of axis which is usually calculated internally. height: The height of axis, which can be setted by user. type_: The type of axis 'number' | 'category' - allow_decimals: Allow the ticks of XAxis to be decimals or not. - allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. - allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". - axis_line: If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line. - mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. - reversed: Reverse the ticks or not. + interval: If set 0, all the ticks will be shown. If set preserveStart", "preserveEnd" or "preserveStartEnd", the ticks which is to be shown or hidden will be calculated automatically. Default: "preserveEnd" + allow_decimals: Allow the ticks of Axis to be decimals or not. Default: True + allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. Default: False + allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True + domain: The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"] + axis_line: If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line. Default: True + mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False + reversed: Reverse the ticks or not. Default: False label: The label of axis, which appears next to the axis. - scale: If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold' | Function + scale: If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto" unit: The unit of data displayed in the axis. This option will be used to represent an index unit in a scatter chart. name: The name of data displayed in the axis. This option will be used to represent an index in a scatter chart. ticks: Set the values of axis ticks manually. tick: If set false, no ticks will be drawn. - tick_count: The count of axis ticks. - tick_line: If set false, no axis tick lines will be drawn. - tick_size: The length of tick line. - min_tick_gap: The minimum gap between two adjacent labels - stroke: The stroke color of axis - text_anchor: The text anchor of axis + tick_count: The count of axis ticks. Not used if 'type' is 'category'. Default: 5 + tick_line: If set false, no axis tick lines will be drawn. Default: True + tick_size: The length of tick line. Default: 6 + min_tick_gap: The minimum gap between two adjacent labels. Default: 5 + stroke: The stroke color of axis. Default: rx.color("gray", 9) + text_anchor: The text anchor of axis. Default: "middle" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -190,6 +220,28 @@ class XAxis(Axis): type_: Optional[ Union[Literal["category", "number"], Var[Literal["category", "number"]]] ] = None, + interval: Optional[ + Union[ + Literal[ + "equidistantPreserveStart", + "preserveEnd", + "preserveStart", + "preserveStartEnd", + ], + Var[ + Union[ + Literal[ + "equidistantPreserveStart", + "preserveEnd", + "preserveStart", + "preserveStartEnd", + ], + int, + ] + ], + int, + ] + ] = None, allow_decimals: Optional[Union[Var[bool], bool]] = None, allow_data_overflow: Optional[Union[Var[bool], bool]] = None, allow_duplicated_category: Optional[Union[Var[bool], bool]] = None, @@ -250,7 +302,12 @@ class XAxis(Axis): tick_size: Optional[Union[Var[int], int]] = None, min_tick_gap: Optional[Union[Var[int], int]] = None, stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None, - text_anchor: Optional[Union[Var[str], str]] = None, + text_anchor: Optional[ + Union[ + Literal["end", "middle", "start"], + Var[Literal["end", "middle", "start"]], + ] + ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -301,30 +358,31 @@ class XAxis(Axis): orientation: The orientation of axis 'top' | 'bottom' x_axis_id: The id of x-axis which is corresponding to the data. include_hidden: Ensures that all datapoints within a chart contribute to its domain calculation, even when they are hidden - domain: The range of the axis. Work best in conjuction with allow_data_overflow. + domain: The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"] data_key: The key of data displayed in the axis. - hide: If set true, the axis do not display in the chart. + hide: If set true, the axis do not display in the chart. Default: False width: The width of axis which is usually calculated internally. height: The height of axis, which can be setted by user. type_: The type of axis 'number' | 'category' - allow_decimals: Allow the ticks of XAxis to be decimals or not. - allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. - allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". - axis_line: If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line. - mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. - reversed: Reverse the ticks or not. + interval: If set 0, all the ticks will be shown. If set preserveStart", "preserveEnd" or "preserveStartEnd", the ticks which is to be shown or hidden will be calculated automatically. Default: "preserveEnd" + allow_decimals: Allow the ticks of Axis to be decimals or not. Default: True + allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. Default: False + allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True + axis_line: If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line. Default: True + mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False + reversed: Reverse the ticks or not. Default: False label: The label of axis, which appears next to the axis. - scale: If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold' | Function + scale: If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto" unit: The unit of data displayed in the axis. This option will be used to represent an index unit in a scatter chart. name: The name of data displayed in the axis. This option will be used to represent an index in a scatter chart. ticks: Set the values of axis ticks manually. tick: If set false, no ticks will be drawn. - tick_count: The count of axis ticks. - tick_line: If set false, no axis tick lines will be drawn. - tick_size: The length of tick line. - min_tick_gap: The minimum gap between two adjacent labels - stroke: The stroke color of axis - text_anchor: The text anchor of axis + tick_count: The count of axis ticks. Not used if 'type' is 'category'. Default: 5 + tick_line: If set false, no axis tick lines will be drawn. Default: True + tick_size: The length of tick line. Default: 6 + min_tick_gap: The minimum gap between two adjacent labels. Default: 5 + stroke: The stroke color of axis. Default: rx.color("gray", 9) + text_anchor: The text anchor of axis. Default: "middle" style: The style of the component. key: A unique key for the component. id: The id for the component. @@ -356,6 +414,28 @@ class YAxis(Axis): type_: Optional[ Union[Literal["category", "number"], Var[Literal["category", "number"]]] ] = None, + interval: Optional[ + Union[ + Literal[ + "equidistantPreserveStart", + "preserveEnd", + "preserveStart", + "preserveStartEnd", + ], + Var[ + Union[ + Literal[ + "equidistantPreserveStart", + "preserveEnd", + "preserveStart", + "preserveStartEnd", + ], + int, + ] + ], + int, + ] + ] = None, allow_decimals: Optional[Union[Var[bool], bool]] = None, allow_data_overflow: Optional[Union[Var[bool], bool]] = None, allow_duplicated_category: Optional[Union[Var[bool], bool]] = None, @@ -416,7 +496,12 @@ class YAxis(Axis): tick_size: Optional[Union[Var[int], int]] = None, min_tick_gap: Optional[Union[Var[int], int]] = None, stroke: Optional[Union[Color, Var[Union[Color, str]], str]] = None, - text_anchor: Optional[Union[Var[str], str]] = None, + text_anchor: Optional[ + Union[ + Literal["end", "middle", "start"], + Var[Literal["end", "middle", "start"]], + ] + ] = None, style: Optional[Style] = None, key: Optional[Any] = None, id: Optional[Any] = None, @@ -466,30 +551,31 @@ class YAxis(Axis): *children: The children of the component. orientation: The orientation of axis 'left' | 'right' y_axis_id: The id of y-axis which is corresponding to the data. - domain: The range of the axis. Work best in conjuction with allow_data_overflow. + domain: The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"] data_key: The key of data displayed in the axis. - hide: If set true, the axis do not display in the chart. + hide: If set true, the axis do not display in the chart. Default: False width: The width of axis which is usually calculated internally. height: The height of axis, which can be setted by user. type_: The type of axis 'number' | 'category' - allow_decimals: Allow the ticks of XAxis to be decimals or not. - allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. - allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". - axis_line: If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line. - mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. - reversed: Reverse the ticks or not. + interval: If set 0, all the ticks will be shown. If set preserveStart", "preserveEnd" or "preserveStartEnd", the ticks which is to be shown or hidden will be calculated automatically. Default: "preserveEnd" + allow_decimals: Allow the ticks of Axis to be decimals or not. Default: True + allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. Default: False + allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True + axis_line: If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line. Default: True + mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False + reversed: Reverse the ticks or not. Default: False label: The label of axis, which appears next to the axis. - scale: If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold' | Function + scale: If 'auto' set, the scale function is decided by the type of chart, and the props type. 'auto' | 'linear' | 'pow' | 'sqrt' | 'log' | 'identity' | 'time' | 'band' | 'point' | 'ordinal' | 'quantile' | 'quantize' | 'utc' | 'sequential' | 'threshold'. Default: "auto" unit: The unit of data displayed in the axis. This option will be used to represent an index unit in a scatter chart. name: The name of data displayed in the axis. This option will be used to represent an index in a scatter chart. ticks: Set the values of axis ticks manually. tick: If set false, no ticks will be drawn. - tick_count: The count of axis ticks. - tick_line: If set false, no axis tick lines will be drawn. - tick_size: The length of tick line. - min_tick_gap: The minimum gap between two adjacent labels - stroke: The stroke color of axis - text_anchor: The text anchor of axis + tick_count: The count of axis ticks. Not used if 'type' is 'category'. Default: 5 + tick_line: If set false, no axis tick lines will be drawn. Default: True + tick_size: The length of tick line. Default: 6 + min_tick_gap: The minimum gap between two adjacent labels. Default: 5 + stroke: The stroke color of axis. Default: rx.color("gray", 9) + text_anchor: The text anchor of axis. Default: "middle" style: The style of the component. key: A unique key for the component. id: The id for the component. diff --git a/reflex/components/recharts/recharts.py b/reflex/components/recharts/recharts.py index adb7bfdf99..3fc35a23af 100644 --- a/reflex/components/recharts/recharts.py +++ b/reflex/components/recharts/recharts.py @@ -60,6 +60,7 @@ class RechartsCharts(NoSSRComponent, MemoizationLeaf): "sequential", "threshold", ] +LiteralTextAnchor = Literal["start", "middle", "end"] LiteralLayout = Literal["horizontal", "vertical"] LiteralPolarRadiusType = Literal["number", "category"] LiteralGridType = Literal["polygon", "circle"] @@ -133,4 +134,7 @@ class RechartsCharts(NoSSRComponent, MemoizationLeaf): ] LiteralDirection = Literal["x", "y", "both"] LiteralInterval = Literal["preserveStart", "preserveEnd", "preserveStartEnd"] +LiteralIntervalAxis = Literal[ + "preserveStart", "preserveEnd", "preserveStartEnd", "equidistantPreserveStart" +] LiteralSyncMethod = Literal["index", "value"] diff --git a/reflex/components/recharts/recharts.pyi b/reflex/components/recharts/recharts.pyi index 1f1937dc6e..eb997b6465 100644 --- a/reflex/components/recharts/recharts.pyi +++ b/reflex/components/recharts/recharts.pyi @@ -171,6 +171,7 @@ LiteralScale = Literal[ "sequential", "threshold", ] +LiteralTextAnchor = Literal["start", "middle", "end"] LiteralLayout = Literal["horizontal", "vertical"] LiteralPolarRadiusType = Literal["number", "category"] LiteralGridType = Literal["polygon", "circle"] @@ -244,4 +245,7 @@ LiteralAreaType = Literal[ ] LiteralDirection = Literal["x", "y", "both"] LiteralInterval = Literal["preserveStart", "preserveEnd", "preserveStartEnd"] +LiteralIntervalAxis = Literal[ + "preserveStart", "preserveEnd", "preserveStartEnd", "equidistantPreserveStart" +] LiteralSyncMethod = Literal["index", "value"] From 9e72106193f0b90b5014b643cfe4bbc2fb09f652 Mon Sep 17 00:00:00 2001 From: carlosabadia Date: Thu, 10 Oct 2024 16:20:20 +0200 Subject: [PATCH 2/2] update --- reflex/components/recharts/cartesian.py | 2 +- reflex/components/recharts/cartesian.pyi | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/reflex/components/recharts/cartesian.py b/reflex/components/recharts/cartesian.py index bff8c582b2..af6c3af896 100644 --- a/reflex/components/recharts/cartesian.py +++ b/reflex/components/recharts/cartesian.py @@ -63,7 +63,7 @@ class Axis(Recharts): # The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"] domain: Var[List] - # If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line. Default: True + # If set false, no axis line will be drawn. Default: True axis_line: Var[bool] # If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False diff --git a/reflex/components/recharts/cartesian.pyi b/reflex/components/recharts/cartesian.pyi index 78a7a8ea70..d1a38f8aa1 100644 --- a/reflex/components/recharts/cartesian.pyi +++ b/reflex/components/recharts/cartesian.pyi @@ -173,7 +173,7 @@ class Axis(Recharts): allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. Default: False allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True domain: The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"] - axis_line: If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line. Default: True + axis_line: If set false, no axis line will be drawn. Default: True mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False reversed: Reverse the ticks or not. Default: False label: The label of axis, which appears next to the axis. @@ -246,6 +246,7 @@ class XAxis(Axis): allow_decimals: Optional[Union[Var[bool], bool]] = None, allow_data_overflow: Optional[Union[Var[bool], bool]] = None, allow_duplicated_category: Optional[Union[Var[bool], bool]] = None, + domain: Optional[Union[List, Var[List]]] = None, axis_line: Optional[Union[Var[bool], bool]] = None, mirror: Optional[Union[Var[bool], bool]] = None, reversed: Optional[Union[Var[bool], bool]] = None, @@ -359,7 +360,6 @@ class XAxis(Axis): orientation: The orientation of axis 'top' | 'bottom'. Default: "bottom" x_axis_id: The id of x-axis which is corresponding to the data. Default: 0 include_hidden: Ensures that all datapoints within a chart contribute to its domain calculation, even when they are hidden. Default: False - domain: The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"] angle: The angle of axis ticks. Default: 0 padding: Specify the padding of x-axis. Default: {"left": 0, "right": 0} data_key: The key of data displayed in the axis. @@ -371,7 +371,8 @@ class XAxis(Axis): allow_decimals: Allow the ticks of Axis to be decimals or not. Default: True allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. Default: False allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True - axis_line: If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line. Default: True + domain: The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"] + axis_line: If set false, no axis line will be drawn. Default: True mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False reversed: Reverse the ticks or not. Default: False label: The label of axis, which appears next to the axis. @@ -442,6 +443,7 @@ class YAxis(Axis): allow_decimals: Optional[Union[Var[bool], bool]] = None, allow_data_overflow: Optional[Union[Var[bool], bool]] = None, allow_duplicated_category: Optional[Union[Var[bool], bool]] = None, + domain: Optional[Union[List, Var[List]]] = None, axis_line: Optional[Union[Var[bool], bool]] = None, mirror: Optional[Union[Var[bool], bool]] = None, reversed: Optional[Union[Var[bool], bool]] = None, @@ -554,7 +556,6 @@ class YAxis(Axis): *children: The children of the component. orientation: The orientation of axis 'left' | 'right'. Default: "left" y_axis_id: The id of y-axis which is corresponding to the data. Default: 0 - domain: The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"] padding: Specify the padding of y-axis. Default: {"top": 0, "bottom": 0} data_key: The key of data displayed in the axis. hide: If set true, the axis do not display in the chart. Default: False @@ -565,7 +566,8 @@ class YAxis(Axis): allow_decimals: Allow the ticks of Axis to be decimals or not. Default: True allow_data_overflow: When domain of the axis is specified and the type of the axis is 'number', if allowDataOverflow is set to be false, the domain will be adjusted when the minimum value of data is smaller than domain[0] or the maximum value of data is greater than domain[1] so that the axis displays all data values. If set to true, graphic elements (line, area, bars) will be clipped to conform to the specified domain. Default: False allow_duplicated_category: Allow the axis has duplicated categorys or not when the type of axis is "category". Default: True - axis_line: If set false, no axis line will be drawn. If set a object, the option is the configuration of axis line. Default: True + domain: The range of the axis. Work best in conjuction with allow_data_overflow. Default: [0, "auto"] + axis_line: If set false, no axis line will be drawn. Default: True mirror: If set true, flips ticks around the axis line, displaying the labels inside the chart instead of outside. Default: False reversed: Reverse the ticks or not. Default: False label: The label of axis, which appears next to the axis.