Add Map chart support (closes #100)#101
Merged
Merged
Conversation
Adds a Map chart series (type: "map") so users can render GEO/region maps such as the USA example without dropping down to a custom SeriesOption implementation. Mirrors the structure used by other charts (Funnel, Treemap, Heatmap): origin interfaces under origin/chart/map and Lombok data classes under charts/map, plus a MapChart wrapper extending Chart<MapChart, MapSeries>. The new public API: - MapChart, MapSeries, MapDataItem, MapEmphasis, MapItemStyle - MapSeriesOption, MapStateOption, MapEmphasisOption, MapDataItemOption, MapItemStyleOption (with map-specific areaColor) Covers: simple snapshot test, advanced USA-map snapshot reproducing the example from the issue, render-engine smoke test, and direct unit tests exercising every public setter (including roam/layoutSize overloads, boundingCoords, nameMap, projection, emphasis flags). 23 new tests, all passing. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced May 10, 2026
Merged
Member
|
Please follow the pattern in |
Adds scripts/config JSON definitions for the Map series following the established Funnel/Treemap/Heatmap pattern, so MapSeries, MapDataItem, MapEmphasis, MapItemStyle and the corresponding origin interfaces are produced by scripts/config-to-java.py rather than hand-written. Regenerated Java mirrors the previous hand-written files; only field order shifts to put inherited fields ahead of own fields, matching what the generator emits for every other chart. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Collaborator
Author
@icepear-jzx added |
incandescentxxc
approved these changes
May 13, 2026
This was referenced May 14, 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
type: "map") so users can render GEO/region maps such as the official USA example without writing a customSeriesOption.org.icepear.echarts.origin.chart.map.*and Lombok data classes underorg.icepear.echarts.charts.map.*, with aMapChartwrapper extendingChart<MapChart, MapSeries>.MapItemStyle.areaColor,setMap,setRoam(Boolean/String overloads),setLayoutCenter/setLayoutSize,setBoundingCoords,setNameMap,setNameProperty,setProjection,setShowLegendSymbol,setMapValueCalculation,setAspectScale,setGeoIndex.Public API added
MapChartcharts.map.MapSeries,MapDataItem,MapEmphasis,MapItemStyleorigin.chart.map.MapSeriesOption,MapStateOption,MapEmphasisOption,MapDataItemOption,MapItemStyleOptionExample usage
Tests added (23 new tests, all passing locally)
simple/map/BasicMapTest— minimal happy-path snapshotadvanced/map/UsaMapChartTest— reproduces the issue's USA examplecharts/map/MapSeriesTest— 19 unit tests covering setter overloads (roam Bool/String, layoutSize Number/String, BoxLayout overloads, rawObjectdata overload), null-omission semantics,areaColornested underitemStyle,MapEmphasis.disabled,nameMap/nameProperty,boundingCoords,geoIndex,MapChartchainingrender/simple/RenderMapByChartTest— exercises the Handlebars render Engine end-to-end with the Map chartTest plan
mvn test -Dtest=BasicMapTest— 1/1 passmvn test -Dtest=UsaMapChartTest— 1/1 passmvn test -Dtest=MapSeriesTest— 19/19 passmvn test -Dtest=RenderMapByChartTest— 2/2 passmvn test(full suite) — all 23 new tests pass; only the 3 pre-existing float-precision failures (TwoValueAxesInPolar1Test,TwoValueAxesInPolar2Test,BasicPolarLineTest) remain, present onmasterbefore this branch and unrelated to this changeCloses #100
CleanShot.2026-05-10.at.17.58.01.mp4