minor chart clean up (#3551)

* minor chart clean up

* PYI

* fix base pyi

* fix pyi issues

* fix cartesian.pyi

---------

Co-authored-by: Alek Petuskey <alekpetuskey@Aleks-MacBook-Pro.local>
Co-authored-by: Lendemor <thomas.brandeho@gmail.com>
This commit is contained in:
Alek Petuskey 2024-07-03 18:27:07 -07:00 committed by GitHub
parent 046c0f9760
commit efe6954552
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 5 deletions

View File

@ -94,6 +94,12 @@ class Axis(Recharts):
# The minimum gap between two adjacent labels
min_tick_gap: Var[int]
# The stroke color of axis
stroke: Var[Union[str, Color]]
# The text anchor of axis
text_anchor: Var[str] # 'start', 'middle', 'end'
# The customized event handler of click on the ticks of this axis
on_click: EventHandler[lambda: []]
@ -177,9 +183,6 @@ class Brush(Recharts):
alias = "RechartsBrush"
# Stroke color
stroke: Var[Union[str, Color]]
# The key of data displayed in the axis.
data_key: Var[Union[str, int]]
@ -210,6 +213,12 @@ class Brush(Recharts):
# The default end index of brush. If the option is not set, the end index will be 1.
end_index: Var[int]
# The fill color of brush
fill: Var[Union[str, Color]]
# The stroke color of brush
stroke: Var[Union[str, Color]]
def get_event_triggers(self) -> dict[str, Union[Var, Any]]:
"""Get the event triggers that pass the component's value to the handler.

View File

@ -86,6 +86,8 @@ class Axis(Recharts):
tick_line: Optional[Union[Var[bool], bool]] = None,
tick_size: Optional[Union[Var[int], int]] = None,
min_tick_gap: Optional[Union[Var[int], int]] = None,
stroke: Optional[Union[Var[Union[Color, str]], str, Color]] = None,
text_anchor: Optional[Union[Var[str], str]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
@ -164,6 +166,8 @@ class Axis(Recharts):
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
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@ -251,6 +255,8 @@ class XAxis(Axis):
tick_line: Optional[Union[Var[bool], bool]] = None,
tick_size: Optional[Union[Var[int], int]] = None,
min_tick_gap: Optional[Union[Var[int], int]] = None,
stroke: Optional[Union[Var[Union[Color, str]], str, Color]] = None,
text_anchor: Optional[Union[Var[str], str]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
@ -331,6 +337,8 @@ class XAxis(Axis):
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
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@ -417,6 +425,8 @@ class YAxis(Axis):
tick_line: Optional[Union[Var[bool], bool]] = None,
tick_size: Optional[Union[Var[int], int]] = None,
min_tick_gap: Optional[Union[Var[int], int]] = None,
stroke: Optional[Union[Var[Union[Color, str]], str, Color]] = None,
text_anchor: Optional[Union[Var[str], str]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
@ -496,6 +506,8 @@ class YAxis(Axis):
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
style: The style of the component.
key: A unique key for the component.
id: The id for the component.
@ -641,7 +653,6 @@ class Brush(Recharts):
def create( # type: ignore
cls,
*children,
stroke: Optional[Union[Var[Union[Color, str]], str, Color]] = None,
data_key: Optional[Union[Var[Union[int, str]], str, int]] = None,
x: Optional[Union[Var[int], int]] = None,
y: Optional[Union[Var[int], int]] = None,
@ -652,6 +663,8 @@ class Brush(Recharts):
gap: Optional[Union[Var[int], int]] = None,
start_index: Optional[Union[Var[int], int]] = None,
end_index: Optional[Union[Var[int], int]] = None,
fill: Optional[Union[Var[Union[Color, str]], str, Color]] = None,
stroke: Optional[Union[Var[Union[Color, str]], str, Color]] = None,
style: Optional[Style] = None,
key: Optional[Any] = None,
id: Optional[Any] = None,
@ -667,7 +680,6 @@ class Brush(Recharts):
Args:
*children: The children of the component.
stroke: Stroke color
data_key: The key of data displayed in the axis.
x: The x-coordinate of brush.
y: The y-coordinate of brush.
@ -678,6 +690,8 @@ class Brush(Recharts):
gap: The data with gap of refreshing chart. If the option is not set, the chart will be refreshed every time
start_index: The default start index of brush. If the option is not set, the start index will be 0.
end_index: The default end index of brush. If the option is not set, the end index will be 1.
fill: The fill color of brush
stroke: The stroke color of brush
style: The style of the component.
key: A unique key for the component.
id: The id for the component.