flet-charts 0.2.0.dev35__tar.gz → 0.2.0.dev40__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of flet-charts might be problematic. Click here for more details.
- {flet_charts-0.2.0.dev35/src/flet_charts.egg-info → flet_charts-0.2.0.dev40}/PKG-INFO +1 -1
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/pyproject.toml +1 -1
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/bar_chart.py +42 -3
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/bar_chart_rod.py +32 -2
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/line_chart.py +58 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/line_chart_data_point.py +29 -1
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/matplotlib_chart.py +2 -1
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/scatter_chart.py +42 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/scatter_chart_spot.py +29 -1
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/types.py +122 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40/src/flet_charts.egg-info}/PKG-INFO +1 -1
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/src/utils/bar_chart.dart +3 -2
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/src/utils/line_chart.dart +3 -2
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/src/utils/scatter_chart.dart +3 -2
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/pubspec.lock +1 -1
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/LICENSE +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/README.md +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/setup.cfg +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/__init__.py +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/bar_chart_group.py +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/bar_chart_rod_stack_item.py +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/chart_axis.py +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/line_chart_data.py +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/pie_chart.py +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/pie_chart_section.py +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/plotly_chart.py +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts.egg-info/SOURCES.txt +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts.egg-info/dependency_links.txt +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts.egg-info/requires.txt +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts.egg-info/top_level.txt +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/CHANGELOG.md +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/LICENSE +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/README.md +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/analysis_options.yaml +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/flet_charts.dart +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/src/bar_chart.dart +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/src/extension.dart +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/src/line_chart.dart +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/src/pie_chart.dart +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/src/scatter_chart.dart +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/src/utils/charts.dart +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/src/utils/pie_chart.dart +0 -0
- {flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/pubspec.yaml +0 -0
|
@@ -88,6 +88,48 @@ class BarChartTooltip:
|
|
|
88
88
|
Controls showing tooltip on top or bottom, default is auto.
|
|
89
89
|
"""
|
|
90
90
|
|
|
91
|
+
def copy_with(
|
|
92
|
+
self,
|
|
93
|
+
*,
|
|
94
|
+
bgcolor: Optional[ft.ColorValue] = None,
|
|
95
|
+
border_radius: Optional[ft.BorderRadiusValue] = None,
|
|
96
|
+
margin: Optional[ft.Number] = None,
|
|
97
|
+
padding: Optional[ft.PaddingValue] = None,
|
|
98
|
+
max_width: Optional[ft.Number] = None,
|
|
99
|
+
rotate_angle: Optional[ft.Number] = None,
|
|
100
|
+
horizontal_offset: Optional[ft.Number] = None,
|
|
101
|
+
border_side: Optional[ft.BorderSide] = None,
|
|
102
|
+
fit_inside_horizontally: Optional[bool] = None,
|
|
103
|
+
fit_inside_vertically: Optional[bool] = None,
|
|
104
|
+
direction: Optional[BarChartTooltipDirection] = None,
|
|
105
|
+
) -> "BarChartTooltip":
|
|
106
|
+
"""
|
|
107
|
+
Returns a copy of this object with the specified properties overridden.
|
|
108
|
+
"""
|
|
109
|
+
return BarChartTooltip(
|
|
110
|
+
bgcolor=bgcolor if bgcolor is not None else self.bgcolor,
|
|
111
|
+
border_radius=border_radius
|
|
112
|
+
if border_radius is not None
|
|
113
|
+
else self.border_radius,
|
|
114
|
+
margin=margin if margin is not None else self.margin,
|
|
115
|
+
padding=padding if padding is not None else self.padding,
|
|
116
|
+
max_width=max_width if max_width is not None else self.max_width,
|
|
117
|
+
rotate_angle=rotate_angle
|
|
118
|
+
if rotate_angle is not None
|
|
119
|
+
else self.rotate_angle,
|
|
120
|
+
horizontal_offset=horizontal_offset
|
|
121
|
+
if horizontal_offset is not None
|
|
122
|
+
else self.horizontal_offset,
|
|
123
|
+
border_side=border_side if border_side is not None else self.border_side,
|
|
124
|
+
fit_inside_horizontally=fit_inside_horizontally
|
|
125
|
+
if fit_inside_horizontally is not None
|
|
126
|
+
else self.fit_inside_horizontally,
|
|
127
|
+
fit_inside_vertically=fit_inside_vertically
|
|
128
|
+
if fit_inside_vertically is not None
|
|
129
|
+
else self.fit_inside_vertically,
|
|
130
|
+
direction=direction if direction is not None else self.direction,
|
|
131
|
+
)
|
|
132
|
+
|
|
91
133
|
|
|
92
134
|
@dataclass
|
|
93
135
|
class BarChartEvent(ft.Event["BarChart"]):
|
|
@@ -137,9 +179,6 @@ class BarChart(ft.ConstrainedControl):
|
|
|
137
179
|
)
|
|
138
180
|
"""
|
|
139
181
|
Controls chart implicit animation.
|
|
140
|
-
|
|
141
|
-
Value is of [`AnimationValue`](https://flet.dev/docs/reference/types/animationvalue)
|
|
142
|
-
type.
|
|
143
182
|
"""
|
|
144
183
|
|
|
145
184
|
interactive: bool = True
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from dataclasses import dataclass, field
|
|
2
|
-
from typing import Optional
|
|
2
|
+
from typing import Optional, Union
|
|
3
3
|
|
|
4
4
|
import flet as ft
|
|
5
5
|
|
|
@@ -22,6 +22,26 @@ class BarChartRodTooltip(ChartDataPointTooltip):
|
|
|
22
22
|
When `None`, defaults to [`BarChartRod.to_y`][(p).].
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
|
+
def copy_with(
|
|
26
|
+
self,
|
|
27
|
+
*,
|
|
28
|
+
text: Optional[str] = None,
|
|
29
|
+
text_style: Optional[ft.TextStyle] = None,
|
|
30
|
+
text_align: Optional[ft.TextAlign] = None,
|
|
31
|
+
text_spans: Optional[list[ft.TextSpan]] = None,
|
|
32
|
+
) -> "BarChartRodTooltip":
|
|
33
|
+
"""
|
|
34
|
+
Returns a copy of this object with the specified properties overridden.
|
|
35
|
+
"""
|
|
36
|
+
return BarChartRodTooltip(
|
|
37
|
+
text=text if text is not None else self.text,
|
|
38
|
+
text_style=text_style if text_style is not None else self.text_style,
|
|
39
|
+
text_align=text_align if text_align is not None else self.text_align,
|
|
40
|
+
text_spans=text_spans.copy()
|
|
41
|
+
if text_spans is not None
|
|
42
|
+
else (self.text_spans.copy() if self.text_spans is not None else None),
|
|
43
|
+
)
|
|
44
|
+
|
|
25
45
|
|
|
26
46
|
@ft.control("BarChartRod")
|
|
27
47
|
class BarChartRod(ft.BaseControl):
|
|
@@ -94,7 +114,9 @@ class BarChartRod(ft.BaseControl):
|
|
|
94
114
|
[`BarChart.interactive`][(p).] is set to `False`.
|
|
95
115
|
"""
|
|
96
116
|
|
|
97
|
-
tooltip: BarChartRodTooltip = field(
|
|
117
|
+
tooltip: Union[BarChartRodTooltip, str] = field(
|
|
118
|
+
default_factory=lambda: BarChartRodTooltip()
|
|
119
|
+
)
|
|
98
120
|
"""
|
|
99
121
|
The rod's tooltip configuration for this rod.
|
|
100
122
|
"""
|
|
@@ -103,3 +125,11 @@ class BarChartRod(ft.BaseControl):
|
|
|
103
125
|
"""
|
|
104
126
|
Whether a tooltip should be shown on top of hovered bar.
|
|
105
127
|
"""
|
|
128
|
+
|
|
129
|
+
def before_update(self):
|
|
130
|
+
super().before_update()
|
|
131
|
+
self._internals["tooltip"] = (
|
|
132
|
+
BarChartRodTooltip(text=self.tooltip)
|
|
133
|
+
if isinstance(self.tooltip, str)
|
|
134
|
+
else self.tooltip
|
|
135
|
+
)
|
|
@@ -27,6 +27,20 @@ class LineChartEventSpot:
|
|
|
27
27
|
The line's point index or `-1` if no point was hovered.
|
|
28
28
|
"""
|
|
29
29
|
|
|
30
|
+
def copy_with(
|
|
31
|
+
self,
|
|
32
|
+
*,
|
|
33
|
+
bar_index: Optional[int] = None,
|
|
34
|
+
spot_index: Optional[int] = None,
|
|
35
|
+
) -> "LineChartEventSpot":
|
|
36
|
+
"""
|
|
37
|
+
Returns a copy of this object with the specified properties overridden.
|
|
38
|
+
"""
|
|
39
|
+
return LineChartEventSpot(
|
|
40
|
+
bar_index=bar_index if bar_index is not None else self.bar_index,
|
|
41
|
+
spot_index=spot_index if spot_index is not None else self.spot_index,
|
|
42
|
+
)
|
|
43
|
+
|
|
30
44
|
|
|
31
45
|
@dataclass
|
|
32
46
|
class LineChartEvent(ft.Event["LineChart"]):
|
|
@@ -102,6 +116,50 @@ class LineChartTooltip:
|
|
|
102
116
|
Whether to force the tooltip container to top of the line.
|
|
103
117
|
"""
|
|
104
118
|
|
|
119
|
+
def copy_with(
|
|
120
|
+
self,
|
|
121
|
+
*,
|
|
122
|
+
bgcolor: Optional[ft.ColorValue] = None,
|
|
123
|
+
border_radius: Optional[ft.BorderRadiusValue] = None,
|
|
124
|
+
margin: Optional[ft.Number] = None,
|
|
125
|
+
padding: Optional[ft.PaddingValue] = None,
|
|
126
|
+
max_width: Optional[ft.Number] = None,
|
|
127
|
+
rotate_angle: Optional[ft.Number] = None,
|
|
128
|
+
horizontal_offset: Optional[ft.Number] = None,
|
|
129
|
+
border_side: Optional[ft.BorderSide] = None,
|
|
130
|
+
fit_inside_horizontally: Optional[bool] = None,
|
|
131
|
+
fit_inside_vertically: Optional[bool] = None,
|
|
132
|
+
show_on_top_of_chart_box_area: Optional[bool] = None,
|
|
133
|
+
) -> "LineChartTooltip":
|
|
134
|
+
"""
|
|
135
|
+
Returns a copy of this object with the specified properties overridden.
|
|
136
|
+
"""
|
|
137
|
+
return LineChartTooltip(
|
|
138
|
+
bgcolor=bgcolor if bgcolor is not None else self.bgcolor,
|
|
139
|
+
border_radius=border_radius
|
|
140
|
+
if border_radius is not None
|
|
141
|
+
else self.border_radius,
|
|
142
|
+
margin=margin if margin is not None else self.margin,
|
|
143
|
+
padding=padding if padding is not None else self.padding,
|
|
144
|
+
max_width=max_width if max_width is not None else self.max_width,
|
|
145
|
+
rotate_angle=rotate_angle
|
|
146
|
+
if rotate_angle is not None
|
|
147
|
+
else self.rotate_angle,
|
|
148
|
+
horizontal_offset=horizontal_offset
|
|
149
|
+
if horizontal_offset is not None
|
|
150
|
+
else self.horizontal_offset,
|
|
151
|
+
border_side=border_side if border_side is not None else self.border_side,
|
|
152
|
+
fit_inside_horizontally=fit_inside_horizontally
|
|
153
|
+
if fit_inside_horizontally is not None
|
|
154
|
+
else self.fit_inside_horizontally,
|
|
155
|
+
fit_inside_vertically=fit_inside_vertically
|
|
156
|
+
if fit_inside_vertically is not None
|
|
157
|
+
else self.fit_inside_vertically,
|
|
158
|
+
show_on_top_of_chart_box_area=show_on_top_of_chart_box_area
|
|
159
|
+
if show_on_top_of_chart_box_area is not None
|
|
160
|
+
else self.show_on_top_of_chart_box_area,
|
|
161
|
+
)
|
|
162
|
+
|
|
105
163
|
|
|
106
164
|
@ft.control("LineChart")
|
|
107
165
|
class LineChart(ft.ConstrainedControl):
|
{flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/line_chart_data_point.py
RENAMED
|
@@ -19,6 +19,26 @@ class LineChartDataPointTooltip(ChartDataPointTooltip):
|
|
|
19
19
|
When `None`, defaults to [`LineChartDataPoint.y`][(p).].
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
|
+
def copy_with(
|
|
23
|
+
self,
|
|
24
|
+
*,
|
|
25
|
+
text: Optional[str] = None,
|
|
26
|
+
text_style: Optional[ft.TextStyle] = None,
|
|
27
|
+
text_align: Optional[ft.TextAlign] = None,
|
|
28
|
+
text_spans: Optional[list[ft.TextSpan]] = None,
|
|
29
|
+
) -> "LineChartDataPointTooltip":
|
|
30
|
+
"""
|
|
31
|
+
Returns a copy of this object with the specified properties overridden.
|
|
32
|
+
"""
|
|
33
|
+
return LineChartDataPointTooltip(
|
|
34
|
+
text=text if text is not None else self.text,
|
|
35
|
+
text_style=text_style if text_style is not None else self.text_style,
|
|
36
|
+
text_align=text_align if text_align is not None else self.text_align,
|
|
37
|
+
text_spans=text_spans.copy()
|
|
38
|
+
if text_spans is not None
|
|
39
|
+
else (self.text_spans.copy() if self.text_spans is not None else None),
|
|
40
|
+
)
|
|
41
|
+
|
|
22
42
|
|
|
23
43
|
@ft.control("LineChartDataPoint")
|
|
24
44
|
class LineChartDataPoint(ft.BaseControl):
|
|
@@ -69,7 +89,7 @@ class LineChartDataPoint(ft.BaseControl):
|
|
|
69
89
|
specify line style to draw.
|
|
70
90
|
"""
|
|
71
91
|
|
|
72
|
-
tooltip: LineChartDataPointTooltip = field(
|
|
92
|
+
tooltip: Union[LineChartDataPointTooltip, str] = field(
|
|
73
93
|
default_factory=lambda: LineChartDataPointTooltip()
|
|
74
94
|
)
|
|
75
95
|
"""
|
|
@@ -80,3 +100,11 @@ class LineChartDataPoint(ft.BaseControl):
|
|
|
80
100
|
"""
|
|
81
101
|
Whether the [`tooltip`][..] should be shown when this data point is hovered over.
|
|
82
102
|
"""
|
|
103
|
+
|
|
104
|
+
def before_update(self):
|
|
105
|
+
super().before_update()
|
|
106
|
+
self._internals["tooltip"] = (
|
|
107
|
+
LineChartDataPointTooltip(text=self.tooltip)
|
|
108
|
+
if isinstance(self.tooltip, str)
|
|
109
|
+
else self.tooltip
|
|
110
|
+
)
|
|
@@ -21,7 +21,8 @@ class MatplotlibChart(ft.Container):
|
|
|
21
21
|
Displays a [Matplotlib](https://matplotlib.org/) chart.
|
|
22
22
|
|
|
23
23
|
Warning:
|
|
24
|
-
This control requires the [`matplotlib`](https://matplotlib.org/)
|
|
24
|
+
This control requires the [`matplotlib`](https://matplotlib.org/)
|
|
25
|
+
Python package to be installed.
|
|
25
26
|
|
|
26
27
|
See this [installation guide](index.md#installation) for more information.
|
|
27
28
|
"""
|
|
@@ -64,6 +64,48 @@ class ScatterChartTooltip:
|
|
|
64
64
|
Forces the tooltip to shift vertically inside the chart, if overflow happens.
|
|
65
65
|
"""
|
|
66
66
|
|
|
67
|
+
def copy_with(
|
|
68
|
+
self,
|
|
69
|
+
*,
|
|
70
|
+
bgcolor: Optional[ft.ColorValue] = None,
|
|
71
|
+
border_radius: Optional[ft.BorderRadiusValue] = None,
|
|
72
|
+
padding: Optional[ft.PaddingValue] = None,
|
|
73
|
+
max_width: Optional[ft.Number] = None,
|
|
74
|
+
rotate_angle: Optional[ft.Number] = None,
|
|
75
|
+
horizontal_offset: Optional[ft.Number] = None,
|
|
76
|
+
horizontal_alignment: Optional[ChartHorizontalAlignment] = None,
|
|
77
|
+
border_side: Optional[ft.BorderSide] = None,
|
|
78
|
+
fit_inside_horizontally: Optional[bool] = None,
|
|
79
|
+
fit_inside_vertically: Optional[bool] = None,
|
|
80
|
+
) -> "ScatterChartTooltip":
|
|
81
|
+
"""
|
|
82
|
+
Returns a copy of this object with the specified properties overridden.
|
|
83
|
+
"""
|
|
84
|
+
return ScatterChartTooltip(
|
|
85
|
+
bgcolor=bgcolor if bgcolor is not None else self.bgcolor,
|
|
86
|
+
border_radius=border_radius
|
|
87
|
+
if border_radius is not None
|
|
88
|
+
else self.border_radius,
|
|
89
|
+
padding=padding if padding is not None else self.padding,
|
|
90
|
+
max_width=max_width if max_width is not None else self.max_width,
|
|
91
|
+
rotate_angle=rotate_angle
|
|
92
|
+
if rotate_angle is not None
|
|
93
|
+
else self.rotate_angle,
|
|
94
|
+
horizontal_offset=horizontal_offset
|
|
95
|
+
if horizontal_offset is not None
|
|
96
|
+
else self.horizontal_offset,
|
|
97
|
+
horizontal_alignment=horizontal_alignment
|
|
98
|
+
if horizontal_alignment is not None
|
|
99
|
+
else self.horizontal_alignment,
|
|
100
|
+
border_side=border_side if border_side is not None else self.border_side,
|
|
101
|
+
fit_inside_horizontally=fit_inside_horizontally
|
|
102
|
+
if fit_inside_horizontally is not None
|
|
103
|
+
else self.fit_inside_horizontally,
|
|
104
|
+
fit_inside_vertically=fit_inside_vertically
|
|
105
|
+
if fit_inside_vertically is not None
|
|
106
|
+
else self.fit_inside_vertically,
|
|
107
|
+
)
|
|
108
|
+
|
|
67
109
|
|
|
68
110
|
@dataclass
|
|
69
111
|
class ScatterChartEvent(ft.Event["ScatterChart"]):
|
|
@@ -21,6 +21,26 @@ class ScatterChartSpotTooltip(ChartDataPointTooltip):
|
|
|
21
21
|
When `None`, defaults to [`ScatterChartSpot.y`][(p).].
|
|
22
22
|
"""
|
|
23
23
|
|
|
24
|
+
def copy_with(
|
|
25
|
+
self,
|
|
26
|
+
*,
|
|
27
|
+
text: Optional[str] = None,
|
|
28
|
+
text_style: Optional[ft.TextStyle] = None,
|
|
29
|
+
text_align: Optional[ft.TextAlign] = None,
|
|
30
|
+
text_spans: Optional[list[ft.TextSpan]] = None,
|
|
31
|
+
) -> "ScatterChartSpotTooltip":
|
|
32
|
+
"""
|
|
33
|
+
Returns a copy of this object with the specified properties overridden.
|
|
34
|
+
"""
|
|
35
|
+
return ScatterChartSpotTooltip(
|
|
36
|
+
text=text if text is not None else self.text,
|
|
37
|
+
text_style=text_style if text_style is not None else self.text_style,
|
|
38
|
+
text_align=text_align if text_align is not None else self.text_align,
|
|
39
|
+
text_spans=text_spans.copy()
|
|
40
|
+
if text_spans is not None
|
|
41
|
+
else (self.text_spans.copy() if self.text_spans is not None else None),
|
|
42
|
+
)
|
|
43
|
+
|
|
24
44
|
|
|
25
45
|
@ft.control("ScatterChartSpot")
|
|
26
46
|
class ScatterChartSpot(ft.BaseControl):
|
|
@@ -75,7 +95,7 @@ class ScatterChartSpot(ft.BaseControl):
|
|
|
75
95
|
TBD
|
|
76
96
|
"""
|
|
77
97
|
|
|
78
|
-
tooltip: ScatterChartSpotTooltip = field(
|
|
98
|
+
tooltip: Union[ScatterChartSpotTooltip, str] = field(
|
|
79
99
|
default_factory=lambda: ScatterChartSpotTooltip()
|
|
80
100
|
)
|
|
81
101
|
"""
|
|
@@ -101,3 +121,11 @@ class ScatterChartSpot(ft.BaseControl):
|
|
|
101
121
|
"""
|
|
102
122
|
TBD
|
|
103
123
|
"""
|
|
124
|
+
|
|
125
|
+
def before_update(self):
|
|
126
|
+
super().before_update()
|
|
127
|
+
self._internals["tooltip"] = (
|
|
128
|
+
ScatterChartSpotTooltip(text=self.tooltip)
|
|
129
|
+
if isinstance(self.tooltip, str)
|
|
130
|
+
else self.tooltip
|
|
131
|
+
)
|
|
@@ -45,6 +45,26 @@ class ChartGridLines:
|
|
|
45
45
|
followed by blank spaces 10 pixels long. By default, a solid line is drawn.
|
|
46
46
|
"""
|
|
47
47
|
|
|
48
|
+
def copy_with(
|
|
49
|
+
self,
|
|
50
|
+
*,
|
|
51
|
+
interval: Optional[ft.Number] = None,
|
|
52
|
+
color: Optional[ft.ColorValue] = None,
|
|
53
|
+
width: Optional[ft.Number] = None,
|
|
54
|
+
dash_pattern: Optional[list[int]] = None,
|
|
55
|
+
) -> "ChartGridLines":
|
|
56
|
+
"""
|
|
57
|
+
Returns a copy of this object with the specified properties overridden.
|
|
58
|
+
"""
|
|
59
|
+
return ChartGridLines(
|
|
60
|
+
interval=interval if interval is not None else self.interval,
|
|
61
|
+
color=color if color is not None else self.color,
|
|
62
|
+
width=width if width is not None else self.width,
|
|
63
|
+
dash_pattern=dash_pattern.copy()
|
|
64
|
+
if dash_pattern is not None
|
|
65
|
+
else (self.dash_pattern.copy() if self.dash_pattern is not None else None),
|
|
66
|
+
)
|
|
67
|
+
|
|
48
68
|
|
|
49
69
|
@dataclass
|
|
50
70
|
class ChartPointShape:
|
|
@@ -88,6 +108,28 @@ class ChartCirclePoint(ChartPointShape):
|
|
|
88
108
|
def __post_init__(self):
|
|
89
109
|
self._type = "ChartCirclePoint"
|
|
90
110
|
|
|
111
|
+
def copy_with(
|
|
112
|
+
self,
|
|
113
|
+
*,
|
|
114
|
+
color: Optional[ft.ColorValue] = None,
|
|
115
|
+
radius: Optional[ft.Number] = None,
|
|
116
|
+
stroke_color: Optional[ft.ColorValue] = None,
|
|
117
|
+
stroke_width: Optional[ft.Number] = None,
|
|
118
|
+
) -> "ChartCirclePoint":
|
|
119
|
+
"""
|
|
120
|
+
Returns a copy of this object with the specified properties overridden.
|
|
121
|
+
"""
|
|
122
|
+
return ChartCirclePoint(
|
|
123
|
+
color=color if color is not None else self.color,
|
|
124
|
+
radius=radius if radius is not None else self.radius,
|
|
125
|
+
stroke_color=stroke_color
|
|
126
|
+
if stroke_color is not None
|
|
127
|
+
else self.stroke_color,
|
|
128
|
+
stroke_width=stroke_width
|
|
129
|
+
if stroke_width is not None
|
|
130
|
+
else self.stroke_width,
|
|
131
|
+
)
|
|
132
|
+
|
|
91
133
|
|
|
92
134
|
@dataclass
|
|
93
135
|
class ChartSquarePoint(ChartPointShape):
|
|
@@ -116,6 +158,28 @@ class ChartSquarePoint(ChartPointShape):
|
|
|
116
158
|
def __post_init__(self):
|
|
117
159
|
self._type = "ChartSquarePoint"
|
|
118
160
|
|
|
161
|
+
def copy_with(
|
|
162
|
+
self,
|
|
163
|
+
*,
|
|
164
|
+
color: Optional[ft.ColorValue] = None,
|
|
165
|
+
size: Optional[ft.Number] = None,
|
|
166
|
+
stroke_color: Optional[ft.ColorValue] = None,
|
|
167
|
+
stroke_width: Optional[ft.Number] = None,
|
|
168
|
+
) -> "ChartSquarePoint":
|
|
169
|
+
"""
|
|
170
|
+
Returns a copy of this object with the specified properties overridden.
|
|
171
|
+
"""
|
|
172
|
+
return ChartSquarePoint(
|
|
173
|
+
color=color if color is not None else self.color,
|
|
174
|
+
size=size if size is not None else self.size,
|
|
175
|
+
stroke_color=stroke_color
|
|
176
|
+
if stroke_color is not None
|
|
177
|
+
else self.stroke_color,
|
|
178
|
+
stroke_width=stroke_width
|
|
179
|
+
if stroke_width is not None
|
|
180
|
+
else self.stroke_width,
|
|
181
|
+
)
|
|
182
|
+
|
|
119
183
|
|
|
120
184
|
@dataclass
|
|
121
185
|
class ChartCrossPoint(ChartPointShape):
|
|
@@ -140,6 +204,22 @@ class ChartCrossPoint(ChartPointShape):
|
|
|
140
204
|
def __post_init__(self):
|
|
141
205
|
self._type = "ChartCrossPoint"
|
|
142
206
|
|
|
207
|
+
def copy_with(
|
|
208
|
+
self,
|
|
209
|
+
*,
|
|
210
|
+
color: Optional[ft.ColorValue] = None,
|
|
211
|
+
size: Optional[ft.Number] = None,
|
|
212
|
+
width: Optional[ft.Number] = None,
|
|
213
|
+
) -> "ChartCrossPoint":
|
|
214
|
+
"""
|
|
215
|
+
Returns a copy of this object with the specified properties overridden.
|
|
216
|
+
"""
|
|
217
|
+
return ChartCrossPoint(
|
|
218
|
+
color=color if color is not None else self.color,
|
|
219
|
+
size=size if size is not None else self.size,
|
|
220
|
+
width=width if width is not None else self.width,
|
|
221
|
+
)
|
|
222
|
+
|
|
143
223
|
|
|
144
224
|
@dataclass
|
|
145
225
|
class ChartPointLine:
|
|
@@ -160,6 +240,26 @@ class ChartPointLine:
|
|
|
160
240
|
The line's dash pattern.
|
|
161
241
|
"""
|
|
162
242
|
|
|
243
|
+
def copy_with(
|
|
244
|
+
self,
|
|
245
|
+
*,
|
|
246
|
+
color: Optional[ft.ColorValue] = None,
|
|
247
|
+
width: Optional[ft.Number] = None,
|
|
248
|
+
dash_pattern: Optional[list[int]] = None,
|
|
249
|
+
) -> "ChartPointLine":
|
|
250
|
+
"""
|
|
251
|
+
Returns a copy of this object with the specified properties overridden.
|
|
252
|
+
"""
|
|
253
|
+
return ChartPointLine(
|
|
254
|
+
color=color if color is not None else self.color,
|
|
255
|
+
width=width if width is not None else self.width,
|
|
256
|
+
dash_pattern=dash_pattern.copy()
|
|
257
|
+
if dash_pattern is not None
|
|
258
|
+
else self.dash_pattern.copy()
|
|
259
|
+
if self.dash_pattern is not None
|
|
260
|
+
else None,
|
|
261
|
+
)
|
|
262
|
+
|
|
163
263
|
|
|
164
264
|
class ChartEventType(Enum):
|
|
165
265
|
"""The type of event that occurred on the chart."""
|
|
@@ -270,6 +370,28 @@ class ChartDataPointTooltip:
|
|
|
270
370
|
Additional text spans to show on a tooltip.
|
|
271
371
|
"""
|
|
272
372
|
|
|
373
|
+
def copy_with(
|
|
374
|
+
self,
|
|
375
|
+
*,
|
|
376
|
+
text: Optional[str] = None,
|
|
377
|
+
text_style: Optional[ft.TextStyle] = None,
|
|
378
|
+
text_align: Optional[ft.TextAlign] = None,
|
|
379
|
+
text_spans: Optional[list[ft.TextSpan]] = None,
|
|
380
|
+
) -> "ChartDataPointTooltip":
|
|
381
|
+
"""
|
|
382
|
+
Returns a copy of this object with the specified properties overridden.
|
|
383
|
+
"""
|
|
384
|
+
return ChartDataPointTooltip(
|
|
385
|
+
text=text if text is not None else self.text,
|
|
386
|
+
text_style=text_style if text_style is not None else self.text_style,
|
|
387
|
+
text_align=text_align if text_align is not None else self.text_align,
|
|
388
|
+
text_spans=text_spans.copy()
|
|
389
|
+
if text_spans is not None
|
|
390
|
+
else self.text_spans.copy()
|
|
391
|
+
if self.text_spans is not None
|
|
392
|
+
else None,
|
|
393
|
+
)
|
|
394
|
+
|
|
273
395
|
|
|
274
396
|
class ChartHorizontalAlignment(Enum):
|
|
275
397
|
"""Defines an element's horizontal alignment to given point."""
|
|
@@ -84,9 +84,10 @@ BarTouchTooltipData? parseBarTouchTooltipData(
|
|
|
84
84
|
BarTooltipItem? parseBarTooltipItem(Control rod, BuildContext context) {
|
|
85
85
|
if (!rod.getBool("show_tooltip", true)!) return null;
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
var tooltip = rod.internals?["tooltip"];
|
|
88
|
+
if (tooltip == null) return null;
|
|
88
89
|
|
|
89
|
-
|
|
90
|
+
final theme = Theme.of(context);
|
|
90
91
|
var tooltipTextStyle =
|
|
91
92
|
parseTextStyle(tooltip["text_style"], theme, const TextStyle())!;
|
|
92
93
|
if (tooltipTextStyle.color == null) {
|
|
@@ -52,9 +52,10 @@ LineTooltipItem? parseLineTooltipItem(
|
|
|
52
52
|
Control dataPoint, LineBarSpot spot, BuildContext context) {
|
|
53
53
|
if (!dataPoint.getBool("show_tooltip", true)!) return null;
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
var tooltip = dataPoint.internals?["tooltip"];
|
|
56
|
+
if (tooltip == null) return null;
|
|
56
57
|
|
|
57
|
-
|
|
58
|
+
final theme = Theme.of(context);
|
|
58
59
|
var style = parseTextStyle(tooltip["text_style"], theme, const TextStyle())!;
|
|
59
60
|
if (style.color == null) {
|
|
60
61
|
style = style.copyWith(
|
|
@@ -65,9 +65,10 @@ ScatterTooltipItem? parseScatterTooltipItem(
|
|
|
65
65
|
Control dataPoint, ScatterSpot spot, BuildContext context) {
|
|
66
66
|
if (!dataPoint.getBool("show_tooltip", true)!) return null;
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
var tooltip = dataPoint.internals?["tooltip"];
|
|
69
|
+
if (tooltip == null) return null;
|
|
69
70
|
|
|
70
|
-
|
|
71
|
+
final theme = Theme.of(context);
|
|
71
72
|
var style = parseTextStyle(tooltip["text_style"], theme, const TextStyle())!;
|
|
72
73
|
if (style.color == null) {
|
|
73
74
|
style = style.copyWith(color: spot.dotPainter.mainColor);
|
|
@@ -134,7 +134,7 @@ packages:
|
|
|
134
134
|
description:
|
|
135
135
|
path: "packages/flet"
|
|
136
136
|
ref: main
|
|
137
|
-
resolved-ref:
|
|
137
|
+
resolved-ref: b2dda6915487cf7147995f4f86a2490da355bcd6
|
|
138
138
|
url: "https://github.com/flet-dev/flet.git"
|
|
139
139
|
source: git
|
|
140
140
|
version: "0.70.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts/bar_chart_rod_stack_item.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flet_charts.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/analysis_options.yaml
RENAMED
|
File without changes
|
{flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/flet_charts.dart
RENAMED
|
File without changes
|
{flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/src/bar_chart.dart
RENAMED
|
File without changes
|
{flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/src/extension.dart
RENAMED
|
File without changes
|
{flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/src/line_chart.dart
RENAMED
|
File without changes
|
{flet_charts-0.2.0.dev35 → flet_charts-0.2.0.dev40}/src/flutter/flet_charts/lib/src/pie_chart.dart
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|