feat(time-pivot): rebuild Time-series Period Pivot on ECharts#42245
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. |
|
The flagged security issue is correct. Using To resolve this, update the tooltipOnClick: () => {
window.open(
'https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases',
'_blank',
'noopener,noreferrer',
);
},I have implemented this fix for the identified issue. As for other comments on this PR, there are no additional review comments in the provided superset-frontend/plugins/plugin-chart-echarts/src/TimePivot/controlPanel.ts |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## remove-legacy-viz-pipeline #42245 +/- ##
============================================================
Coverage 65.50% 65.50%
============================================================
Files 2786 2792 +6
Lines 155137 155297 +160
Branches 35675 35735 +60
============================================================
+ Hits 101617 101734 +117
- Misses 51633 51676 +43
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:
|
|
🎪 Showtime deployed environment on GHA for 67753a7 • Environment: http://16.144.30.21:8080 (admin/admin) |
|
🎪 Showtime deployed environment on GHA for a21a036 • Environment: http://16.146.13.43:8080 (admin/admin) |
65d2ea5 to
059eabe
Compare
|
🎪 Showtime deployed environment on GHA for ff3e0a2 • Environment: http://44.248.0.4:8080 (admin/admin) |
Swap the nvd3 renderer for an ECharts line chart while reusing the already-ported period-pivot reshape verbatim: transformData buckets timestamps by the pandas-style freq offset, ranks periods most-recent first and shifts priors onto the current period's time axis. Styling matches nvd3 -- the current period draws boldly in the picked color and on top, while prior periods fade with their recency percentile. Control names and the viz_type stay the same, so saved charts keep working with no migration; nvd3-only pixel-margin and axis-min/max toggles are dropped since ECharts handles layout. The reshape tests move over unchanged, with new transformProps coverage for series ordering, fading, log scale, bounds and empty results. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…rse-tabnabbing Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-axis format control A line series with a single point renders nothing when symbols are hidden, which made sparse pivots (yearly data over 52-week periods) look empty; symbols now show for series with two or fewer points. The 40-plus period legend adds little, so it defaults off while staying togglable. Adds the x_axis_format control (D3 time formats, matching the legacy control name) applied to the axis labels. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Prevents zero/negative metric values from producing a broken ECharts log-scale y-axis, following the same pattern used in Timeseries. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…control Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A long daily history pivoted weekly overlays a hundred-plus series at once; the new Number of periods control keeps only the N most recent, clamped between 1 and the periods present in the data, with empty keeping them all. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🎪 Showtime deployed environment on GHA for f373e98 • Environment: http://35.87.141.133:8080 (admin/admin) |
|
🎪 Showtime deployed environment on GHA for 0c6ec5f • Environment: http://34.217.93.221:8080 (admin/admin) |
SUMMARY
Stacked on #41714, sibling to #42225. Rebuilds Time-series Period Pivot as an ECharts line chart, so once both land, nothing registers an nvd3 renderer and the
preset-chart-nvd3package can be deleted in a follow-up.The hard part was already done by the v1 migration: the period-pivot reshape (
transformData.ts, with the freq-anchored rollback arithmetic and its tests) moves over verbatim — only the render layer changes. Styling matches nvd3: the current period draws boldly in the picked color and paints on top, prior periods fade with their recency percentile. Control names andviz_type: time_pivotare unchanged, so saved charts keep working with no DB migration. nvd3-only pixel-margin and axis min/max toggles are dropped (ECharts lays those out automatically); ECharts tooltips/legend come for free.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screenshots to follow from the ephemeral env.
TESTING INSTRUCTIONS
npx jest plugins/plugin-chart-echarts/test/TimePivot/— the carried-over rollback/reshape suite plus new transformProps coverage (series ordering, current-on-top fading, log scale, y-bounds, empty results).birth_names(sum__num, freqAS) — current year bold, prior years faded behind it.ADDITIONAL INFORMATION
🤖 Generated with Claude Code