feat(bullet): rebuild the Bullet Chart on ECharts#42225
Conversation
|
Bito Automatic Review Skipped - Branch Excluded |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## remove-legacy-viz-pipeline #42225 +/- ##
===========================================================
Coverage 65.50% 65.50%
===========================================================
Files 2786 2792 +6
Lines 155137 155209 +72
Branches 35675 35692 +17
===========================================================
+ Hits 101617 101677 +60
- Misses 51633 51645 +12
Partials 1887 1887
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bcd320c to
65d2ea5
Compare
|
🎪 Showtime deployed environment on GHA for fbf2126 • Environment: http://52.13.51.86:8080 (admin/admin) |
65d2ea5 to
059eabe
Compare
|
🎪 Showtime deployed environment on GHA for 684a97e • Environment: http://18.237.87.147:8080 (admin/admin) |
Replace the nvd3 bullet renderer with an ECharts composition: nested qualitative range bands via markArea (largest threshold painted first so smaller bands nest on top, using the theme fill tokens), the measure as a thin primary-color bar, triangle point markers as a scatter series, and marker lines via markLine with their labels. Control names and semantics (comma-separated ranges/markers/marker lines plus labels) match the legacy chart exactly, and the viz_type stays `bullet`, so saved charts keep working with no migration. Adds a shared y_axis_format control for number formatting and registers the new plugin in MainPreset in place of the nvd3 one, leaving Time-series Period Pivot as the sole nvd3 chart. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Verified via GitHub Actions pre-commit run that only prettier/oxlint flagged this file; the local Type-Checking/stylelint hooks fail here only due to this worktree lacking built package lib/ artifacts, which CI's own run shows as Skipped for this fileset. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ip HTML markerLabelOf() resolved labels via indexOf(value), so duplicate marker or marker-line values collapsed onto the first matching label. Resolve by position instead. Also route the tooltip HTML strings (which embed user-configured metric/marker labels) through sanitizeHtml(), matching the convention already used by tooltipHtml() elsewhere in this plugin package, to avoid a stored-XSS vector via chart label text. Verified locally: Type-Checking passes once the composite build artifacts are present (this worktree normally lacks them for new Bullet source files); stylelint fails here only due to a missing postcss-styled-syntax module in the local npx cache, unrelated to this diff (no css-in-js files touched). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nder When every plotted value is identical (e.g. an empty result measuring 0) the x-axis min and max coincided, producing a zero-width domain. Widen the domain by one unit (or 10% of the magnitude) in that case. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Marker-line labels render inside the plot instead of clipping at the chart edge; the legend is dropped entirely since a single-measure chart gains nothing from it and it collided with the x-axis labels; range labels now surface inside their band's right edge; the triangle markers sit below the measure bar pointing up at their value instead of hiding inside it. Control descriptions spell out the comma-separated numeric/text expectations with examples, and each label control only appears once its paired values control has content. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ltip range labels Tokenizing is lenient instead of throwing: the controls re-render on every keystroke, so partial input like a trailing comma must not error the chart (or leave it stuck in the error state). Empty and non-numeric tokens are dropped. The marker offset is computed in pixels from the chart height since a percentage offset of the symbol size lands inside a tall measure bar. Range labels, which markArea labels never rendered, now surface as lines on the measure bar's tooltip. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…mation Hovering the thin bar precisely was the only way to see the range labels; the tooltip now triggers on the axis so hovering anywhere shows the measure, labeled ranges, markers and marker lines together. Control changes no longer animate elements in from the bottom. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The combined axis tooltip is replaced with per-item hovers: the bar shows the measure, markers show their own label and value, and each range threshold gets an invisible hover target carrying its label (markArea is not reliably hoverable). A Show labels control prints marker and range labels directly on the chart and disables tooltips entirely. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🎪 Showtime deployed environment on GHA for 38d59fb • Environment: http://100.23.165.50:8080 (admin/admin) |
Every range, marker and marker line is now its own named series (marker lines as empty line series carrying a markLine), so the new Show legend control lists them all as always-visible entries whose clicks natively toggle the corresponding element. Show labels remains independent, and per-item tooltips are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🎪 Showtime deployed environment on GHA for caa31e3 • Environment: http://35.90.254.226:8080 (admin/admin) |
A new optional Dimensions control renders one bullet row per group value on a shared value axis: the y-axis lists the group labels, the measure bar becomes one bar per row, and the range bands, markers and marker lines automatically span every row so all rows share the same settings. Marker offsets scale to the per-row band height, and grouped bar tooltips name their row. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
SUMMARY
Stacked on #41714. Rebuilds the Bullet Chart as an ECharts composition so the last-but-one nvd3 chart comes off that library, leaving Time-series Period Pivot as the only nvd3 renderer.
The composition mirrors d3-bullet semantics: nested qualitative range bands (markArea, largest threshold painted first so smaller bands nest on top, shaded with the theme fill tokens), the measure as a thin primary-color bar, triangle point markers as a scatter series, and marker lines via markLine with their labels. Control names and their comma-separated value semantics (
ranges,range_labels,markers,marker_labels,marker_lines,marker_line_labels) match the legacy chart exactly and theviz_typestaysbullet, so saved charts keep working with no DB migration. A sharedy_axis_formatcontrol is added for number formatting (the legacy chart had no format control).BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screenshots to follow from the ephemeral env.
TESTING INSTRUCTIONS
npx jest plugins/plugin-chart-echarts/test/Bullet/— buildQuery + transformProps coverage (bands ordering, markers, marker lines, legacy 110% default band, empty-result safety).birth_names(e.g.sum__numwith ranges100000,200000,300000).ADDITIONAL INFORMATION
🤖 Generated with Claude Code