Add Lines chart support#103
Merged
Merged
Conversation
Adds the lines series (type: "lines") — draws lines/curves between coordinate pairs, the standard pick for flight paths, geo flows, and migration visualizations. Pairs naturally with the map and effectScatter series for animated map overlays. The new public API: - Lines (top-level wrapper, extends base Chart so xAxis/yAxis are not auto-emitted; users wire axes via Option for cartesian usage) - LinesSeries, LinesDataItem, LinesEmphasis, LinesEffect Key fields: - coords: Number[][] on each LinesDataItem (start/end or polyline points) - coordinateSystem: "geo" | "cartesian2d" | "polar" - polyline, large, largeThreshold - LinesEffect: show, period, delay, constantSpeed, symbol, symbolSize, color, trailLength, loop, roundTrip — drives the moving-symbol animation Tests (25 new, all passing): - BasicLinesTest (snapshot) - LinesSeriesTest (21 unit tests covering every setter overload, all three coordinate systems, effect nesting, lineStyle nesting, emphasis flags, the no-empty-axis-arrays invariant, null-omission) - RenderLinesByChartTest (Engine smoke test) - LinesDemo (writes /tmp/lines-demo.html — opt-in) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds scripts/config JSON definitions for the Lines series so LinesSeries, LinesEffect, LinesDataItem, LinesEmphasis and the corresponding origin interfaces are produced by scripts/config-to-java.py rather than hand-written. Field ordering on the class shifts to put inherited fields ahead of own fields, matching generator output across other charts. setSeriesLayoutBy collapses to a single String setter because LinesSeriesOption does not extend SeriesEncodeOptionMixin; no tests exercised the prior Object overload. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
incandescentxxc
approved these changes
May 13, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
map(PR Add Map chart support (closes #100) #101) andeffectScatter(PR Add EffectScatter chart support #102) for the canonical "animated flows on a map" pattern.Linesextends the baseChart(notCartesianCoordChart), so emptyxAxis/yAxisarrays aren't auto-emitted — important when the user is usingcoordinateSystem: "geo". For cartesian2d usage, axes can be wired viaOptiondirectly.Public API added
Linescharts.lines.LinesSeries,LinesDataItem,LinesEmphasis,LinesEffectorigin.chart.lines.LinesSeriesOption,LinesStateOption,LinesEmphasisOption,LinesDataItemOption,LinesEffectOptionHow to use
Cartesian (no map needed)
Geo (paired with the map series from PR #101)
For a runnable visual demo with 5 "flight paths" on a dark canvas, see
src/test/java/org/icepear/echarts/demo/LinesDemo.java— runmvn test -Dtest=LinesDemothenopen /tmp/lines-demo.html.Tests added (25 new, all passing)
simple/lines/BasicLinesTest— snapshotcharts/lines/LinesSeriesTest— 21 unit tests covering every setter overload, all three coordinate systems, effect nesting, lineStyle nesting, emphasis flags, the no-empty-axis-arrays invariant, null-omission, and round-trip serializationrender/simple/RenderLinesByChartTest— Engine smoke testdemo/LinesDemo— opt-in HTML writer for visual inspectionTest plan
mvn test -Dtest=BasicLinesTest— 1/1mvn test -Dtest=LinesSeriesTest— 21/21mvn test -Dtest=RenderLinesByChartTest— 2/2mvn test -Dtest=LinesDemothenopen /tmp/lines-demo.html— animated arrows render correctlymvn test(full suite) — 101 tests, only the 3 pre-existing polar/float-precision failures remainCleanShot.2026-05-10.at.20.08.04.mp4