Add PictorialBar chart support#104
Merged
Merged
Conversation
Adds the pictorialBar series (type: "pictorialBar") — a bar chart that uses repeated symbols (pictograms) instead of solid rectangles. Standard choice for infographic-style dashboards (icon stacks, progress pictograms). The new public API: - PictorialBar (top-level CartesianCoordChart wrapper, mirrors Bar) - PictorialBarSeries, PictorialBarDataItem, PictorialBarEmphasis Reuses BarItemStyleOption / BarLabelOption / BarBackgroundStyleOption from the existing Bar package — pictorialBar shares those semantics. The pictogram-specific fields (with the standard Number/String overload pattern where applicable): - symbol (preset name or path://... SVG) - symbolSize, symbolPosition, symbolOffset, symbolRotate - symbolRepeat (Boolean | Number | String "fixed") - symbolRepeatDirection - symbolMargin, symbolClip, symbolBoundingData, symbolPatternSize - hoverAnimation All also available per-data-item to override series-level settings. Tests (26 new, all passing): - BasicPictorialBarTest (snapshot) - PictorialBarSeriesTest (22 unit tests covering every overload, all three symbolRepeat type variants, per-data-item overrides, bar-layout passthrough, item/label nesting, emphasis flags, null-omission) - RenderPictorialBarByChartTest (Engine smoke test) - PictorialBarDemo (writes /tmp/pictorial-bar-demo.html — opt-in) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds scripts/config JSON definitions for the PictorialBar series so PictorialBarSeries, PictorialBarDataItem, PictorialBarEmphasis and the corresponding origin interfaces are produced by scripts/config-to-java.py rather than hand-written. Field/method ordering on the classes shifts to put inherited members ahead of own members, matching generator output across other charts. 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
Barstructure (sameCartesianCoordChartbase, sameBaseBarSeriesOptionmixin), and reusesBarItemStyleOption/BarLabelOptionsince pictorialBar shares those semantics.Public API added
PictorialBarcharts.pictorialBar.PictorialBarSeries,PictorialBarDataItem,PictorialBarEmphasisorigin.chart.pictorialBar.PictorialBarSeriesOption,PictorialBarStateOption,PictorialBarEmphasisOption,PictorialBarDataItemOptionPictogram-specific fields
symbol(preset name orpath://SVG),symbolSize,symbolPosition(start/center/end),symbolOffset,symbolRotate,symbolRepeat(Boolean / Number / Stringfixed),symbolRepeatDirection,symbolMargin,symbolClip,symbolBoundingData,symbolPatternSize,hoverAnimation.How to use
Basic — repeated circles for daily steps
Custom SVG path (person icon)
For the runnable visual demo, see
src/test/java/org/icepear/echarts/demo/PictorialBarDemo.java— runmvn test -Dtest=PictorialBarDemothenopen /tmp/pictorial-bar-demo.html.Tests added (26 new, all passing)
simple/pictorialBar/BasicPictorialBarTest— snapshotcharts/pictorialBar/PictorialBarSeriesTest— 22 unit tests covering every overload (symbolSize Number / Number[] / String / String[]; symbolRepeat Boolean / Number / String; symbolMargin Number / String; symbolBoundingData Number / Number[]), per-data-item symbol overrides, bar-layout passthrough (barWidth,barGap,barCategoryGap, etc.), itemStyle/label nesting, emphasis flags, polar coordinate system, null-omissionrender/simple/RenderPictorialBarByChartTest— Engine smoke testdemo/PictorialBarDemo— opt-in HTML writer for visual inspectionTest plan
mvn test -Dtest=BasicPictorialBarTest— 1/1mvn test -Dtest=PictorialBarSeriesTest— 22/22mvn test -Dtest=RenderPictorialBarByChartTest— 2/2mvn test -Dtest=PictorialBarDemothenopen /tmp/pictorial-bar-demo.html— pictograms render correctlymvn test(full suite) — 102 tests, only the 3 pre-existing polar/float-precision failures remainCleanShot.2026-05-10.at.20.10.11.mp4