Skip to content

Commit 7bebd3a

Browse files
committed
Add LineChartNode, a data-driven line chart node
LineChartNode (type lineChart) and LineChartProperties: a series read from variables['data'] through xField/yField (numbers or wall-clock dates), an optional domain, plot insets, bands, y ticks, area gradient, area bands, a polyline or Catmull-Rom curve, reference lines, x ticks, markers, vertical lines and a scrub readout. List bindings and their JSON shapes are documented on the class. Properties decode with defaults when missing, and default text style paints have fixed ids so defaults compare equal. Register it with NodeJsonConverter, cover it in the every-node-type round-trip test and add JSON round-trip and default tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F3B1XCZZ7QGvZLUGgSG5H4
1 parent cd38fe3 commit 7bebd3a

7 files changed

Lines changed: 1221 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## Unreleased
2+
3+
- `LineChartNode` (`lineChart`) and `LineChartProperties`: a data-driven
4+
line chart. The series, domain, bands, grid lines, area bands, reference
5+
lines, x ticks, markers and vertical lines are bound through `variables`
6+
(see the class docs for their JSON shapes); colors, insets, curve style,
7+
text styles and the scrub readout are properties.
8+
19
## 6.0.0
210

311
### Breaking changes

‎lib/src/api/node_json_converter.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class NodeJsonConverter implements JsonConverter<BaseNode?, Map> {
6666
'webView': WebViewNode.fromJson,
6767
'dropdown': DropdownNode.fromJson,
6868
'progressBar': ProgressBarNode.fromJson,
69+
'lineChart': LineChartNode.fromJson,
6970
'variance': VarianceNode.fromJson,
7071
'listView': ListViewNode.fromJson,
7172
'gridView': GridViewNode.fromJson,

0 commit comments

Comments
 (0)