flet-charts 0.2.0.dev18__tar.gz → 0.2.0.dev35__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.

Files changed (43) hide show
  1. {flet_charts-0.2.0.dev18/src/flet_charts.egg-info → flet_charts-0.2.0.dev35}/PKG-INFO +1 -1
  2. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/pyproject.toml +36 -16
  3. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/__init__.py +39 -0
  4. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/bar_chart.py +4 -24
  5. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/bar_chart_rod.py +4 -10
  6. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/bar_chart_rod_stack_item.py +1 -3
  7. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/line_chart.py +4 -24
  8. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/line_chart_data.py +10 -20
  9. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/line_chart_data_point.py +5 -8
  10. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/matplotlib_chart.py +2 -2
  11. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/pie_chart.py +3 -9
  12. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/pie_chart_section.py +11 -14
  13. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/plotly_chart.py +4 -3
  14. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/scatter_chart.py +3 -17
  15. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/scatter_chart_spot.py +9 -8
  16. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/types.py +17 -21
  17. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35/src/flet_charts.egg-info}/PKG-INFO +1 -1
  18. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/pubspec.lock +7 -7
  19. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/pubspec.yaml +1 -1
  20. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/LICENSE +0 -0
  21. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/README.md +0 -0
  22. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/setup.cfg +0 -0
  23. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/bar_chart_group.py +0 -0
  24. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts/chart_axis.py +0 -0
  25. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts.egg-info/SOURCES.txt +0 -0
  26. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts.egg-info/dependency_links.txt +0 -0
  27. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts.egg-info/requires.txt +0 -0
  28. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flet_charts.egg-info/top_level.txt +0 -0
  29. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/CHANGELOG.md +0 -0
  30. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/LICENSE +0 -0
  31. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/README.md +0 -0
  32. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/analysis_options.yaml +0 -0
  33. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/lib/flet_charts.dart +0 -0
  34. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/lib/src/bar_chart.dart +0 -0
  35. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/lib/src/extension.dart +0 -0
  36. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/lib/src/line_chart.dart +0 -0
  37. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/lib/src/pie_chart.dart +0 -0
  38. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/lib/src/scatter_chart.dart +0 -0
  39. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/lib/src/utils/bar_chart.dart +0 -0
  40. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/lib/src/utils/charts.dart +0 -0
  41. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/lib/src/utils/line_chart.dart +0 -0
  42. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/lib/src/utils/pie_chart.dart +0 -0
  43. {flet_charts-0.2.0.dev18 → flet_charts-0.2.0.dev35}/src/flutter/flet_charts/lib/src/utils/scatter_chart.dart +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flet-charts
3
- Version: 0.2.0.dev18
3
+ Version: 0.2.0.dev35
4
4
  Summary: A Flet extension for creating interactive charts and graphs.
5
5
  Author-email: Flet contributors <hello@flet.dev>
6
6
  License-Expression: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "flet-charts"
3
- version = "0.2.0.dev18"
3
+ version = "0.2.0.dev35"
4
4
  description = "A Flet extension for creating interactive charts and graphs."
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Flet contributors", email = "hello@flet.dev" }]
@@ -25,24 +25,43 @@ plotly = ["plotly>=6.0.1"]
25
25
  matplotlib = ["matplotlib>=3.10.1"]
26
26
 
27
27
  [dependency-groups]
28
+ test = [
29
+ "pytest >=7.2.0",
30
+ ]
31
+ lint = [
32
+ "ruff >=0.11.7",
33
+ ]
28
34
  dev = [
29
- "pre-commit>=4.2.0",
30
- "ruff>=0.11.7",
31
- "matplotlib>=3.10.1",
32
- "plotly>=6.0.1",
35
+ "pre-commit >=4.2.0",
36
+ { include-group = 'lint' },
37
+ { include-group = 'test' },
38
+ ]
39
+ docs-coverage = [
40
+ "docstr-coverage >=2.3.2",
33
41
  ]
34
42
  docs = [
35
- "mkdocs",
36
- "mkdocs-material",
37
- "mkdocstrings[python]",
38
- "mkdocstrings-python-xref",
39
- "mike",
40
- "markdown>=3.6",
41
- "pymdown-extensions",
42
- "mkdocs-glightbox",
43
- "mkdocs-section-index",
44
- "griffe-modernized-annotations",
45
- "pygments>=2.16",
43
+ "mkdocs >=1.6.1",
44
+ "mkdocs-material >=9.6.15",
45
+ "mkdocstrings-python >=1.16.12",
46
+ "mkdocstrings-python-xref >=1.16.3",
47
+ "mike >=2.1.3",
48
+ "markdown >=3.6",
49
+ "pymdown-extensions >=10.16",
50
+ "mkdocs-exclude >=1.0.2",
51
+ "mkdocs-glightbox >=0.4.0",
52
+ "mkdocs-open-in-new-tab >=1.0.8",
53
+ "mkdocs-section-index >=0.3.10",
54
+ "griffe-modernized-annotations >=1.0.8",
55
+ "griffe-warnings-deprecated >=1.1.0",
56
+ "pygments >=2.16",
57
+ "markdown-exec[ansi] >=1.11.0",
58
+ "pydocstyle >=6.3.0",
59
+ "linkcheckmd >=1.4.0",
60
+ { include-group = 'docs-coverage' },
61
+ ]
62
+ all = [
63
+ { include-group = 'dev' },
64
+ { include-group = 'docs' },
46
65
  ]
47
66
 
48
67
  [tool.ruff]
@@ -67,6 +86,7 @@ select = [
67
86
  "I"
68
87
  ]
69
88
  preview = true
89
+ pydocstyle = { convention = 'google' }
70
90
 
71
91
  [tool.ruff.format]
72
92
  quote-style = "double"
@@ -33,3 +33,42 @@ from .types import (
33
33
  ChartPointShape,
34
34
  ChartSquarePoint,
35
35
  )
36
+
37
+ __all__ = [
38
+ "BarChart",
39
+ "BarChartEvent",
40
+ "BarChartGroup",
41
+ "BarChartRod",
42
+ "BarChartRodStackItem",
43
+ "BarChartRodTooltip",
44
+ "BarChartTooltip",
45
+ "BarChartTooltipDirection",
46
+ "ChartAxis",
47
+ "ChartAxisLabel",
48
+ "ChartCirclePoint",
49
+ "ChartCrossPoint",
50
+ "ChartDataPointTooltip",
51
+ "ChartEventType",
52
+ "ChartGridLines",
53
+ "ChartHorizontalAlignment",
54
+ "ChartPointLine",
55
+ "ChartPointShape",
56
+ "ChartSquarePoint",
57
+ "LineChart",
58
+ "LineChartData",
59
+ "LineChartDataPoint",
60
+ "LineChartDataPointTooltip",
61
+ "LineChartEvent",
62
+ "LineChartEventSpot",
63
+ "LineChartTooltip",
64
+ "MatplotlibChart",
65
+ "PieChart",
66
+ "PieChartEvent",
67
+ "PieChartSection",
68
+ "PlotlyChart",
69
+ "ScatterChart",
70
+ "ScatterChartEvent",
71
+ "ScatterChartSpot",
72
+ "ScatterChartSpotTooltip",
73
+ "ScatterChartTooltip",
74
+ ]
@@ -11,8 +11,8 @@ from .types import ChartEventType, ChartGridLines
11
11
  __all__ = [
12
12
  "BarChart",
13
13
  "BarChartEvent",
14
- "BarChartTooltipDirection",
15
14
  "BarChartTooltip",
15
+ "BarChartTooltipDirection",
16
16
  ]
17
17
 
18
18
 
@@ -35,7 +35,7 @@ class BarChartTooltip:
35
35
 
36
36
  bgcolor: ft.ColorValue = ft.Colors.SECONDARY
37
37
  """
38
- Background [color](https://flet.dev/docs/reference/colors) of tooltips.
38
+ Background color of tooltips.
39
39
  """
40
40
 
41
41
  border_radius: Optional[ft.BorderRadiusValue] = None
@@ -76,15 +76,11 @@ class BarChartTooltip:
76
76
  fit_inside_horizontally: Optional[bool] = None
77
77
  """
78
78
  Forces the tooltip to shift horizontally inside the chart, if overflow happens.
79
-
80
- Value is of type `bool`.
81
79
  """
82
80
 
83
81
  fit_inside_vertically: Optional[bool] = None
84
82
  """
85
83
  Forces the tooltip to shift vertically inside the chart, if overflow happens.
86
-
87
- Value is of type `bool`.
88
84
  """
89
85
 
90
86
  direction: Optional[BarChartTooltipDirection] = None
@@ -153,56 +149,42 @@ class BarChart(ft.ConstrainedControl):
153
149
 
154
150
  bgcolor: Optional[ft.ColorValue] = None
155
151
  """
156
- Background [color](https://flet.dev/docs/reference/colors) of the chart.
152
+ Background color of the chart.
157
153
  """
158
154
 
159
155
  border: Optional[ft.Border] = None
160
156
  """
161
157
  The border around the chart.
162
-
163
- Value is of type [`Border`](https://flet.dev/docs/reference/types/border).
164
158
  """
165
159
 
166
160
  horizontal_grid_lines: Optional[ChartGridLines] = None
167
161
  """
168
162
  Controls drawing of chart's horizontal lines.
169
-
170
- Value is of type [`ChartGridLines`][(p).].
171
163
  """
172
164
 
173
165
  vertical_grid_lines: Optional[ChartGridLines] = None
174
166
  """
175
167
  Controls drawing of chart's vertical lines.
176
-
177
- Value is of type [`ChartGridLines`][(p).].
178
168
  """
179
169
 
180
170
  left_axis: ChartAxis = field(default_factory=lambda: ChartAxis(label_size=44))
181
171
  """
182
172
  The appearance of the left axis, its title and labels.
183
-
184
- Value is of type [`ChartAxis`][(p).].
185
173
  """
186
174
 
187
175
  top_axis: ChartAxis = field(default_factory=lambda: ChartAxis(label_size=30))
188
176
  """
189
177
  The appearance of the top axis, its title and labels.
190
-
191
- Value is of type [`ChartAxis`][(p).].
192
178
  """
193
179
 
194
180
  right_axis: ChartAxis = field(default_factory=lambda: ChartAxis(label_size=44))
195
181
  """
196
182
  The appearance of the right axis, its title and labels.
197
-
198
- Value is of type [`ChartAxis`][(p).].
199
183
  """
200
184
 
201
185
  bottom_axis: ChartAxis = field(default_factory=lambda: ChartAxis(label_size=30))
202
186
  """
203
187
  The appearance of the bottom axis, its title and labels.
204
-
205
- Value is of type [`ChartAxis`][(p).].
206
188
  """
207
189
 
208
190
  baseline_y: Optional[ft.Number] = None
@@ -225,11 +207,9 @@ class BarChart(ft.ConstrainedControl):
225
207
  The tooltip configuration for the chart.
226
208
  """
227
209
 
228
- on_event: ft.OptionalEventHandler[BarChartEvent["BarChart"]] = None
210
+ on_event: Optional[ft.EventHandler[BarChartEvent]] = None
229
211
  """
230
212
  Fires when a bar is hovered or clicked.
231
-
232
- Event handler receives an instance of [`BarChartEvent`][(p).].
233
213
  """
234
214
 
235
215
  def __post_init__(self, ref: Optional[ft.Ref[Any]]):
@@ -1,5 +1,5 @@
1
1
  from dataclasses import dataclass, field
2
- from typing import Any, Optional
2
+ from typing import Optional
3
3
 
4
4
  import flet as ft
5
5
 
@@ -49,14 +49,12 @@ class BarChartRod(ft.BaseControl):
49
49
 
50
50
  color: Optional[ft.ColorValue] = None
51
51
  """
52
- Rod [color](https://flet.dev/docs/reference/colors).
52
+ Rod color.
53
53
  """
54
54
 
55
55
  gradient: Optional[ft.Gradient] = None
56
56
  """
57
57
  Gradient to draw rod's background.
58
-
59
- Value is of type [`Gradient`](https://flet.dev/docs/reference/types/gradient).
60
58
  """
61
59
 
62
60
  border_radius: Optional[ft.BorderRadiusValue] = None
@@ -67,9 +65,6 @@ class BarChartRod(ft.BaseControl):
67
65
  border_side: Optional[ft.BorderSide] = None
68
66
  """
69
67
  Border to draw around rod.
70
-
71
- Value is of type [`BorderSide`](https://flet.dev/docs/reference/types/borderside)
72
- class.
73
68
  """
74
69
 
75
70
  bg_from_y: Optional[ft.Number] = None
@@ -84,7 +79,7 @@ class BarChartRod(ft.BaseControl):
84
79
 
85
80
  bgcolor: Optional[ft.ColorValue] = None
86
81
  """
87
- An optional [color](https://flet.dev/docs/reference/colors) of a background behind
82
+ An optional color of a background behind
88
83
  this rod.
89
84
  """
90
85
 
@@ -96,7 +91,7 @@ class BarChartRod(ft.BaseControl):
96
91
  selected: bool = False
97
92
  """
98
93
  If set to `True` a tooltip is always shown on top of the bar when
99
- `BarChart.interactive` is set to `False`.
94
+ [`BarChart.interactive`][(p).] is set to `False`.
100
95
  """
101
96
 
102
97
  tooltip: BarChartRodTooltip = field(default_factory=lambda: BarChartRodTooltip())
@@ -108,4 +103,3 @@ class BarChartRod(ft.BaseControl):
108
103
  """
109
104
  Whether a tooltip should be shown on top of hovered bar.
110
105
  """
111
-
@@ -20,12 +20,10 @@ class BarChartRodStackItem(ft.BaseControl):
20
20
 
21
21
  color: Optional[ft.ColorValue] = None
22
22
  """
23
- The [color](https://flet.dev/docs/reference/colors) of this item.
23
+ The color of this item.
24
24
  """
25
25
 
26
26
  border_side: ft.BorderSide = field(default_factory=lambda: ft.BorderSide.none())
27
27
  """
28
28
  A border around this item.
29
-
30
- Value is of type [`BorderSide`](https://flet.dev/docs/reference/types/borderside).
31
29
  """
@@ -29,7 +29,7 @@ class LineChartEventSpot:
29
29
 
30
30
 
31
31
  @dataclass
32
- class LineChartEvent(ft.Event[ft.EventControlType]):
32
+ class LineChartEvent(ft.Event["LineChart"]):
33
33
  type: ChartEventType
34
34
  """
35
35
  The type of event that occured.
@@ -47,7 +47,7 @@ class LineChartTooltip:
47
47
 
48
48
  bgcolor: ft.ColorValue = "#FF607D8B"
49
49
  """
50
- Background [color](https://flet.dev/docs/reference/colors) of tooltip.
50
+ Background color of tooltip.
51
51
  """
52
52
 
53
53
  border_radius: Optional[ft.BorderRadiusValue] = None
@@ -65,8 +65,6 @@ class LineChartTooltip:
65
65
  )
66
66
  """
67
67
  Applies a padding for showing contents inside the tooltip.
68
-
69
- Value is of type [`PaddingValue`](https://flet.dev/docs/reference/types/aliases#paddingvalue).
70
68
  """
71
69
 
72
70
  max_width: ft.Number = 120
@@ -126,8 +124,6 @@ class LineChart(ft.ConstrainedControl):
126
124
  )
127
125
  """
128
126
  Controls chart implicit animation.
129
-
130
- Value is of type [`AnimationValue`](https://flet.dev/docs/reference/types/animationvalue).
131
127
  """
132
128
 
133
129
  interactive: bool = True
@@ -151,56 +147,42 @@ class LineChart(ft.ConstrainedControl):
151
147
 
152
148
  bgcolor: Optional[ft.ColorValue] = None
153
149
  """
154
- Background [color](https://flet.dev/docs/reference/colors) of the chart.
150
+ Background color of the chart.
155
151
  """
156
152
 
157
153
  border: Optional[ft.Border] = None
158
154
  """
159
155
  The border around the chart.
160
-
161
- Value is of type [`Border`](https://flet.dev/docs/reference/types/border).
162
156
  """
163
157
 
164
158
  horizontal_grid_lines: Optional[ChartGridLines] = None
165
159
  """
166
160
  Controls drawing of chart's horizontal lines.
167
-
168
- Value is of type [`ChartGridLines`][(p).].
169
161
  """
170
162
 
171
163
  vertical_grid_lines: Optional[ChartGridLines] = None
172
164
  """
173
165
  Controls drawing of chart's vertical lines.
174
-
175
- Value is of type [`ChartGridLines`][(p).].
176
166
  """
177
167
 
178
168
  left_axis: ChartAxis = field(default_factory=lambda: ChartAxis(label_size=44))
179
169
  """
180
170
  Defines the appearance of the left axis, its title and labels.
181
-
182
- Value is of type [`ChartAxis`][(p).].
183
171
  """
184
172
 
185
173
  top_axis: ChartAxis = field(default_factory=lambda: ChartAxis(label_size=30))
186
174
  """
187
175
  Defines the appearance of the top axis, its title and labels.
188
-
189
- Value is of type [`ChartAxis`][(p).].
190
176
  """
191
177
 
192
178
  right_axis: ChartAxis = field(default_factory=lambda: ChartAxis(label_size=44))
193
179
  """
194
180
  Defines the appearance of the right axis, its title and labels.
195
-
196
- Value is of type [`ChartAxis`][(p).].
197
181
  """
198
182
 
199
183
  bottom_axis: ChartAxis = field(default_factory=lambda: ChartAxis(label_size=30))
200
184
  """
201
185
  Defines the appearance of the bottom axis, its title and labels.
202
-
203
- Value is of type [`ChartAxis`][(p).].
204
186
  """
205
187
 
206
188
  baseline_x: Optional[ft.Number] = None
@@ -238,11 +220,9 @@ class LineChart(ft.ConstrainedControl):
238
220
  The tooltip configuration for this chart.
239
221
  """
240
222
 
241
- on_event: ft.OptionalEventHandler[LineChartEvent["LineChart"]] = None
223
+ on_event: Optional[ft.EventHandler[LineChartEvent]] = None
242
224
  """
243
225
  Fires when a chart line is hovered or clicked.
244
-
245
- Value is of type [`LineChartEvent`][(p).].
246
226
  """
247
227
 
248
228
  def __post_init__(self, ref: Optional[ft.Ref[Any]]):
@@ -24,14 +24,12 @@ class LineChartData(ft.BaseControl):
24
24
 
25
25
  color: ft.ColorValue = ft.Colors.CYAN
26
26
  """
27
- A [color](https://flet.dev/docs/reference/colors) of chart line.
27
+ A color of chart line.
28
28
  """
29
29
 
30
30
  gradient: Optional[ft.Gradient] = None
31
31
  """
32
32
  Gradient to draw line's background.
33
-
34
- Value is of type [`Gradient`](https://flet.dev/docs/reference/types/gradient).
35
33
  """
36
34
 
37
35
  stroke_width: ft.Number = 2.0
@@ -62,17 +60,17 @@ class LineChartData(ft.BaseControl):
62
60
  drawn.
63
61
  """
64
62
 
65
- shadow: ft.BoxShadow = field(default_factory=lambda: ft.BoxShadow(color=ft.Colors.TRANSPARENT))
63
+ shadow: ft.BoxShadow = field(
64
+ default_factory=lambda: ft.BoxShadow(color=ft.Colors.TRANSPARENT)
65
+ )
66
66
  """
67
67
  Shadow to drop by a chart line.
68
-
69
- Value is of type [`BoxShadow`](https://flet.dev/docs/reference/types/boxshadow).
70
68
  """
71
69
 
72
70
  above_line_bgcolor: Optional[ft.ColorValue] = None
73
71
  """
74
72
  Fill the area above chart line with the specified
75
- [color](https://flet.dev/docs/reference/colors).
73
+ color.
76
74
  """
77
75
 
78
76
  above_line_gradient: Optional[ft.Gradient] = None
@@ -88,14 +86,12 @@ class LineChartData(ft.BaseControl):
88
86
  above_line: Optional[ChartPointLine] = None
89
87
  """
90
88
  A vertical line drawn between a line point and the top edge of the chart.
91
-
92
- Value is of type [`ChartPointLine`][(p).].
93
89
  """
94
90
 
95
91
  below_line_bgcolor: Optional[ft.ColorValue] = None
96
92
  """
97
93
  Fill the area below chart line with the specified
98
- [color](https://flet.dev/docs/reference/colors).
94
+ color.
99
95
  """
100
96
 
101
97
  below_line_gradient: Optional[ft.Gradient] = None
@@ -111,30 +107,24 @@ class LineChartData(ft.BaseControl):
111
107
  below_line: Optional[ChartPointLine] = None
112
108
  """
113
109
  A vertical line drawn between a line point and the bottom edge of the chart.
114
-
115
- Value is of type [`ChartPointLine`][(p).].
116
110
  """
117
111
 
118
112
  selected_below_line: Union[None, bool, ChartPointLine] = None
119
113
  """
120
114
  A vertical line drawn between selected line point and the bottom adge of the
121
- chart. The value is either `True` - draw a line with default style, `False` - do
122
- not draw a line under selected point, or an instance of
123
- [`ChartPointLine`][(p).] class to
124
- specify line style to draw.
115
+ chart.
116
+
117
+ Setting this property to `True` will draw a line with default style.
125
118
  """
126
119
 
127
120
  point: Union[None, bool, ChartPointShape] = None
128
121
  """
129
122
  Defines the appearance and shape of a line point (dot).
130
123
 
131
- Value is of type bool (`True` - draw a point with default style or `False` - do
132
- not draw a line point) or of type [`ChartPointShape`][(p).].
124
+ Setting this property to `True` will draw a point with default style.
133
125
  """
134
126
 
135
127
  selected_point: Union[None, bool, ChartPointShape] = None
136
128
  """
137
129
  Defines the appearance and shape of a selected line point.
138
-
139
- Value is of type [`ChartPointShape`][(p).].
140
130
  """
@@ -1,5 +1,5 @@
1
1
  from dataclasses import dataclass, field
2
- from typing import Any, Optional, Union
2
+ from typing import Optional, Union
3
3
 
4
4
  import flet as ft
5
5
 
@@ -36,22 +36,18 @@ class LineChartDataPoint(ft.BaseControl):
36
36
 
37
37
  selected: bool = False
38
38
  """
39
- Draw the point as selected when [`LineChart.interactive`][(p).]
39
+ Draw the point as selected when [`LineChart.interactive`][(p).]
40
40
  is set to `False`.
41
41
  """
42
42
 
43
43
  point: Union[None, bool, ChartPointShape] = None
44
44
  """
45
45
  Defines the appearance and shape of a line point.
46
-
47
- Value is of type [`ChartPointShape`][(p).].
48
46
  """
49
47
 
50
48
  selected_point: Union[None, bool, ChartPointShape] = None
51
49
  """
52
50
  Defines the appearance and shape of a selected line point.
53
-
54
- Value is of type [`ChartPointShape`][(p).].
55
51
  """
56
52
 
57
53
  show_above_line: bool = True
@@ -73,7 +69,9 @@ class LineChartDataPoint(ft.BaseControl):
73
69
  specify line style to draw.
74
70
  """
75
71
 
76
- tooltip: LineChartDataPointTooltip = field(default_factory=lambda: LineChartDataPointTooltip())
72
+ tooltip: LineChartDataPointTooltip = field(
73
+ default_factory=lambda: LineChartDataPointTooltip()
74
+ )
77
75
  """
78
76
  Configuration of the tooltip for this data point.
79
77
  """
@@ -82,4 +80,3 @@ class LineChartDataPoint(ft.BaseControl):
82
80
  """
83
81
  Whether the [`tooltip`][..] should be shown when this data point is hovered over.
84
82
  """
85
-
@@ -28,7 +28,7 @@ class MatplotlibChart(ft.Container):
28
28
 
29
29
  figure: Figure = field(metadata={"skip": True})
30
30
  """
31
- Matplotlib figure to draw - an instance of
31
+ Matplotlib figure to draw - an instance of
32
32
  [`matplotlib.figure.Figure`](https://matplotlib.org/stable/api/_as_gen/matplotlib.figure.Figure.html#matplotlib.figure.Figure).
33
33
  """
34
34
 
@@ -45,7 +45,7 @@ class MatplotlibChart(ft.Container):
45
45
  """
46
46
 
47
47
  def init(self):
48
- self.alignment = ft.Alignment.center()
48
+ self.alignment = ft.Alignment.CENTER
49
49
  self.__img = ft.Image(fit=ft.BoxFit.FILL)
50
50
  self.content = self.__img
51
51
 
@@ -10,12 +10,10 @@ __all__ = ["PieChart", "PieChartEvent"]
10
10
 
11
11
 
12
12
  @dataclass
13
- class PieChartEvent(ft.Event[ft.EventControlType]):
13
+ class PieChartEvent(ft.Event["PieChart"]):
14
14
  type: ChartEventType
15
15
  """
16
16
  Type of the event.
17
-
18
- Value is of type [`ChartEventType`][(p).].
19
17
  """
20
18
 
21
19
  section_index: Optional[int] = None
@@ -50,7 +48,7 @@ class PieChart(ft.ConstrainedControl):
50
48
 
51
49
  center_space_color: Optional[ft.ColorValue] = None
52
50
  """
53
- Free space [color](https://flet.dev/docs/reference/colors) in the middle of a chart.
51
+ Free space color in the middle of a chart.
54
52
  """
55
53
 
56
54
  center_space_radius: Optional[ft.Number] = None
@@ -77,13 +75,9 @@ class PieChart(ft.ConstrainedControl):
77
75
  )
78
76
  """
79
77
  Controls chart implicit animation.
80
-
81
- Value is of type [`AnimationValue`](https://flet.dev/docs/reference/types/animationvalue).
82
78
  """
83
79
 
84
- on_event: ft.OptionalEventHandler[PieChartEvent["PieChart"]] = None
80
+ on_event: Optional[ft.EventHandler[PieChartEvent]] = None
85
81
  """
86
82
  Fires when a chart section is hovered or clicked.
87
-
88
- Event data is an instance [`PieChartEvent`][(p).].
89
83
  """
@@ -29,14 +29,12 @@ class PieChartSection(ft.BaseControl):
29
29
 
30
30
  color: Optional[ft.ColorValue] = None
31
31
  """
32
- Background [color](https://flet.dev/docs/reference/colors) of the section.
32
+ Background color of the section.
33
33
  """
34
34
 
35
35
  border_side: ft.BorderSide = field(default_factory=lambda: ft.BorderSide.none())
36
36
  """
37
37
  The border around section shape.
38
-
39
- Value is of type [`BorderSide`](https://flet.dev/docs/reference/types/borderside).
40
38
  """
41
39
 
42
40
  title: Optional[str] = None
@@ -47,19 +45,16 @@ class PieChartSection(ft.BaseControl):
47
45
  title_style: Optional[ft.TextStyle] = None
48
46
  """
49
47
  The style to draw `title` with.
50
-
51
- The value is an instance of [`TextStyle`](https://flet.dev/docs/reference/types/textstyle)
52
- class.
53
48
  """
54
49
 
55
50
  title_position: Optional[ft.Number] = None
56
51
  """
57
52
  The position/offset of the title relative to the section's center.
58
-
53
+
59
54
  By default the title is drawn in the middle of the section.
60
-
55
+
61
56
  Note:
62
- Must be between `0.0` (near the center)
57
+ Must be between `0.0` (near the center)
63
58
  and `1.0`(near the outside of the chart) inclusive.
64
59
  """
65
60
 
@@ -71,19 +66,21 @@ class PieChartSection(ft.BaseControl):
71
66
  badge_position: Optional[ft.Number] = None
72
67
  """
73
68
  The position/offset of the badge relative to the section's center.
74
-
69
+
75
70
  By default the badge is drawn in the middle of the section.
76
-
71
+
77
72
  Note:
78
- Must be between `0.0` (near the center)
73
+ Must be between `0.0` (near the center)
79
74
  and `1.0`(near the outside of the chart) inclusive.
80
75
  """
81
76
 
82
77
  def before_update(self):
83
78
  super().before_update()
84
79
  assert self.title_position is None or (0.0 <= self.title_position <= 1.0), (
85
- f"title_position ({self.title_position}) must be between 0.0 and 1.0 inclusive"
80
+ f"title_position must be between 0.0 and 1.0 inclusive, "
81
+ f"got {self.title_position}"
86
82
  )
87
83
  assert self.badge_position is None or (0.0 <= self.badge_position <= 1.0), (
88
- f"badge_position ({self.badge_position}) must be between 0.0 and 1.0 inclusive"
84
+ f"badge_position must be between 0.0 and 1.0 inclusive, "
85
+ f"got {self.badge_position}"
89
86
  )
@@ -20,14 +20,15 @@ class PlotlyChart(ft.Container):
20
20
  Displays a [Plotly](https://plotly.com/python/) chart.
21
21
 
22
22
  Warning:
23
- This control requires the [`plotly`](https://plotly.com/python/) Python package to be installed.
23
+ This control requires the [`plotly`](https://plotly.com/python/) Python
24
+ package to be installed.
24
25
 
25
26
  See this [installation guide](index.md#installation) for more information.
26
27
  """
27
28
 
28
29
  figure: Figure = field(metadata={"skip": True})
29
30
  """
30
- Plotly figure to draw -
31
+ Plotly figure to draw -
31
32
  an instance of [`plotly.graph_objects.Figure`](https://plotly.com/python-api-reference/generated/plotly.graph_objects.Figure.html).
32
33
  """
33
34
 
@@ -39,7 +40,7 @@ class PlotlyChart(ft.Container):
39
40
  """
40
41
 
41
42
  def init(self):
42
- self.alignment = ft.Alignment.center()
43
+ self.alignment = ft.Alignment.CENTER
43
44
  self.__img = ft.Image(fit=ft.BoxFit.FILL)
44
45
  self.content = self.__img
45
46
 
@@ -16,7 +16,7 @@ class ScatterChartTooltip:
16
16
 
17
17
  bgcolor: ft.ColorValue = "#FF607D8B"
18
18
  """
19
- The tooltip's background [color](https://flet.dev/docs/reference/colors).
19
+ The tooltip's background color.
20
20
  """
21
21
 
22
22
  border_radius: Optional[ft.BorderRadiusValue] = None
@@ -66,7 +66,7 @@ class ScatterChartTooltip:
66
66
 
67
67
 
68
68
  @dataclass
69
- class ScatterChartEvent(ft.Event[ft.EventControlType]):
69
+ class ScatterChartEvent(ft.Event["ScatterChart"]):
70
70
  type: ChartEventType
71
71
  """
72
72
  Type of the event (e.g. tapDown, panUpdate)
@@ -132,43 +132,31 @@ class ScatterChart(ft.ConstrainedControl):
132
132
  horizontal_grid_lines: Optional[ChartGridLines] = None
133
133
  """
134
134
  Controls drawing of chart's horizontal lines.
135
-
136
- Value is of type [`ChartGridLines`][(p).].
137
135
  """
138
136
 
139
137
  vertical_grid_lines: Optional[ChartGridLines] = None
140
138
  """
141
139
  Controls drawing of chart's vertical lines.
142
-
143
- Value is of type [`ChartGridLines`][(p).].
144
140
  """
145
141
 
146
142
  left_axis: ChartAxis = field(default_factory=lambda: ChartAxis())
147
143
  """
148
144
  Configures the appearance of the left axis, its title and labels.
149
-
150
- Value is of type [`ChartAxis`][(p).].
151
145
  """
152
146
 
153
147
  top_axis: ChartAxis = field(default_factory=lambda: ChartAxis())
154
148
  """
155
149
  Configures the appearance of the top axis, its title and labels.
156
-
157
- Value is of type [`ChartAxis`][(p).].
158
150
  """
159
151
 
160
152
  right_axis: ChartAxis = field(default_factory=lambda: ChartAxis())
161
153
  """
162
154
  Configures the appearance of the right axis, its title and labels.
163
-
164
- Value is of type [`ChartAxis`][(p).].
165
155
  """
166
156
 
167
157
  bottom_axis: ChartAxis = field(default_factory=lambda: ChartAxis())
168
158
  """
169
159
  Configures the appearance of the bottom axis, its title and labels.
170
-
171
- Value is of type [`ChartAxis`][(p).].
172
160
  """
173
161
 
174
162
  baseline_x: Optional[ft.Number] = None
@@ -206,11 +194,9 @@ class ScatterChart(ft.ConstrainedControl):
206
194
  The tooltip configuration for the chart.
207
195
  """
208
196
 
209
- on_event: ft.OptionalEventHandler[ScatterChartEvent["ScatterChart"]] = None
197
+ on_event: Optional[ft.EventHandler[ScatterChartEvent]] = None
210
198
  """
211
199
  Fires when an event occurs on the chart.
212
-
213
- Event handler receives an instance of [`ScatterChartEvent`][(p).].
214
200
  """
215
201
 
216
202
  def __post_init__(self, ref: Optional[ft.Ref[Any]]):
@@ -58,16 +58,16 @@ class ScatterChartSpot(ft.BaseControl):
58
58
 
59
59
  x_error: Optional[Any] = None
60
60
  """
61
- Determines the error range of the data point using
62
- (FlErrorRange)[https://github.com/imaNNeo/fl_chart/blob/main/repo_files/documentations/base_chart.md#flerrorrange]
63
- (which ontains lowerBy and upperValue) for the `X` axis.
61
+ Determines the error range of the data point using
62
+ [FlErrorRange](https://github.com/imaNNeo/fl_chart/blob/main/repo_files/documentations/base_chart.md#flerrorrange)
63
+ (which contains lowerBy and upperValue) for the `X` axis.
64
64
  """
65
65
 
66
66
  y_error: Optional[Any] = None
67
67
  """
68
- Determines the error range of the data point using
69
- (FlErrorRange)[https://github.com/imaNNeo/fl_chart/blob/main/repo_files/documentations/base_chart.md#flerrorrange]
70
- (which ontains lowerBy and upperValue) for the `Y` axis.
68
+ Determines the error range of the data point using
69
+ [FlErrorRange](https://github.com/imaNNeo/fl_chart/blob/main/repo_files/documentations/base_chart.md#flerrorrange)
70
+ (which contains lowerBy and upperValue) for the `Y` axis.
71
71
  """
72
72
 
73
73
  selected: bool = False
@@ -75,7 +75,9 @@ class ScatterChartSpot(ft.BaseControl):
75
75
  TBD
76
76
  """
77
77
 
78
- tooltip: ScatterChartSpotTooltip = field(default_factory=lambda: ScatterChartSpotTooltip())
78
+ tooltip: ScatterChartSpotTooltip = field(
79
+ default_factory=lambda: ScatterChartSpotTooltip()
80
+ )
79
81
  """
80
82
  Tooltip configuration for this spot.
81
83
  """
@@ -99,4 +101,3 @@ class ScatterChartSpot(ft.BaseControl):
99
101
  """
100
102
  TBD
101
103
  """
102
-
@@ -5,15 +5,15 @@ from typing import Optional
5
5
  import flet as ft
6
6
 
7
7
  __all__ = [
8
- "ChartPointShape",
9
8
  "ChartCirclePoint",
10
- "ChartSquarePoint",
11
9
  "ChartCrossPoint",
12
- "ChartPointLine",
10
+ "ChartDataPointTooltip",
13
11
  "ChartEventType",
14
12
  "ChartGridLines",
15
- "ChartDataPointTooltip",
16
13
  "ChartHorizontalAlignment",
14
+ "ChartPointLine",
15
+ "ChartPointShape",
16
+ "ChartSquarePoint",
17
17
  ]
18
18
 
19
19
 
@@ -30,7 +30,7 @@ class ChartGridLines:
30
30
 
31
31
  color: Optional[ft.ColorValue] = None
32
32
  """
33
- The [color](https://flet.dev/docs/reference/colors) of a grid line.
33
+ The color of a grid line.
34
34
  """
35
35
 
36
36
  width: ft.Number = 2.0
@@ -46,7 +46,7 @@ class ChartGridLines:
46
46
  """
47
47
 
48
48
 
49
- @dataclass(kw_only=True) # todo
49
+ @dataclass
50
50
  class ChartPointShape:
51
51
  """
52
52
  Base class for chart point shapes.
@@ -67,7 +67,7 @@ class ChartCirclePoint(ChartPointShape):
67
67
 
68
68
  color: Optional[ft.ColorValue] = None
69
69
  """
70
- The fill [color](https://flet.dev/docs/reference/colors) to use for the circle.
70
+ The fill color to use for the circle.
71
71
  """
72
72
 
73
73
  radius: Optional[ft.Number] = None
@@ -77,7 +77,7 @@ class ChartCirclePoint(ChartPointShape):
77
77
 
78
78
  stroke_color: Optional[ft.ColorValue] = None
79
79
  """
80
- The stroke [color](https://flet.dev/docs/reference/colors) to use for the circle
80
+ The stroke color to use for the circle
81
81
  """
82
82
 
83
83
  stroke_width: ft.Number = 0
@@ -95,7 +95,7 @@ class ChartSquarePoint(ChartPointShape):
95
95
 
96
96
  color: Optional[ft.ColorValue] = None
97
97
  """
98
- The fill [color](https://flet.dev/docs/reference/colors) to use for the square.
98
+ The fill color to use for the square.
99
99
  """
100
100
 
101
101
  size: ft.Number = 4.0
@@ -105,7 +105,7 @@ class ChartSquarePoint(ChartPointShape):
105
105
 
106
106
  stroke_color: Optional[ft.ColorValue] = None
107
107
  """
108
- The stroke [color](https://flet.dev/docs/reference/colors) to use for the square.
108
+ The stroke color to use for the square.
109
109
  """
110
110
 
111
111
  stroke_width: ft.Number = 1.0
@@ -123,7 +123,7 @@ class ChartCrossPoint(ChartPointShape):
123
123
 
124
124
  color: Optional[ft.ColorValue] = None
125
125
  """
126
- The fill [color](https://flet.dev/docs/reference/colors) to use for the
126
+ The fill color to use for the
127
127
  cross-mark(X).
128
128
  """
129
129
 
@@ -147,7 +147,7 @@ class ChartPointLine:
147
147
 
148
148
  color: Optional[ft.ColorValue] = None
149
149
  """
150
- The line's [color](https://flet.dev/docs/reference/colors).
150
+ The line's color.
151
151
  """
152
152
 
153
153
  width: ft.Number = 2
@@ -166,7 +166,7 @@ class ChartEventType(Enum):
166
166
 
167
167
  PAN_END = "panEnd"
168
168
  """
169
- When a pointer that was previously in contact with
169
+ When a pointer that was previously in contact with
170
170
  the screen and moving is no longer in contact with the screen.
171
171
  """
172
172
 
@@ -177,14 +177,14 @@ class ChartEventType(Enum):
177
177
 
178
178
  POINTER_EXIT = "pointerExit"
179
179
  """
180
- The pointer has moved with respect to the device while the
180
+ The pointer has moved with respect to the device while the
181
181
  pointer is or is not in contact with the device, and exited our chart.
182
182
  """
183
183
 
184
184
  LONG_PRESS_END = "longPressEnd"
185
185
  """
186
- When a pointer stops contacting the screen after a long press
187
- gesture was detected. Also reports the position where the
186
+ When a pointer stops contacting the screen after a long press
187
+ gesture was detected. Also reports the position where the
188
188
  pointer stopped contacting the screen.
189
189
  """
190
190
 
@@ -200,7 +200,7 @@ class ChartEventType(Enum):
200
200
 
201
201
  POINTER_ENTER = "pointerEnter"
202
202
  """
203
-
203
+
204
204
  """
205
205
 
206
206
  POINTER_HOVER = "pointerHover"
@@ -258,15 +258,11 @@ class ChartDataPointTooltip:
258
258
  text_style: ft.TextStyle = field(default_factory=lambda: ft.TextStyle())
259
259
  """
260
260
  A text style to display tooltip with.
261
-
262
- Value is of type [`TextStyle`](https://flet.dev/docs/reference/types/textstyle).
263
261
  """
264
262
 
265
263
  text_align: ft.TextAlign = ft.TextAlign.CENTER
266
264
  """
267
265
  An align for the tooltip.
268
-
269
- Value is of type [`TextAlign`](https://flet.dev/docs/reference/types/textalign).
270
266
  """
271
267
 
272
268
  text_spans: Optional[list[ft.TextSpan]] = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flet-charts
3
- Version: 0.2.0.dev18
3
+ Version: 0.2.0.dev35
4
4
  Summary: A Flet extension for creating interactive charts and graphs.
5
5
  Author-email: Flet contributors <hello@flet.dev>
6
6
  License-Expression: Apache-2.0
@@ -134,7 +134,7 @@ packages:
134
134
  description:
135
135
  path: "packages/flet"
136
136
  ref: main
137
- resolved-ref: b996d06ff462b88f5b31d6cceafac34ea6f57968
137
+ resolved-ref: cf8823c5d766ea7866480986aa3ee871f4091e78
138
138
  url: "https://github.com/flet-dev/flet.git"
139
139
  source: git
140
140
  version: "0.70.0"
@@ -155,10 +155,10 @@ packages:
155
155
  dependency: "direct dev"
156
156
  description:
157
157
  name: flutter_lints
158
- sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
158
+ sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1"
159
159
  url: "https://pub.dev"
160
160
  source: hosted
161
- version: "2.0.3"
161
+ version: "3.0.2"
162
162
  flutter_localizations:
163
163
  dependency: transitive
164
164
  description: flutter
@@ -266,10 +266,10 @@ packages:
266
266
  dependency: transitive
267
267
  description:
268
268
  name: lints
269
- sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
269
+ sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
270
270
  url: "https://pub.dev"
271
271
  source: hosted
272
- version: "2.1.1"
272
+ version: "3.0.0"
273
273
  logging:
274
274
  dependency: transitive
275
275
  description:
@@ -743,10 +743,10 @@ packages:
743
743
  dependency: transitive
744
744
  description:
745
745
  name: window_manager
746
- sha256: "51d50168ab267d344b975b15390426b1243600d436770d3f13de67e55b05ec16"
746
+ sha256: "7eb6d6c4164ec08e1bf978d6e733f3cebe792e2a23fb07cbca25c2872bfdbdcd"
747
747
  url: "https://pub.dev"
748
748
  source: hosted
749
- version: "0.5.0"
749
+ version: "0.5.1"
750
750
  window_to_front:
751
751
  dependency: transitive
752
752
  description:
@@ -21,4 +21,4 @@ dependencies:
21
21
  dev_dependencies:
22
22
  flutter_test:
23
23
  sdk: flutter
24
- flutter_lints: ^2.0.0
24
+ flutter_lints: ^3.0.0