feat(parallel-coordinates): migrate para chart to v1 chart data API - #41716
Conversation
|
Bito Automatic Review Skipped - Branch Excluded |
|
The flagged issue is correct. The current implementation of Here is the corrected implementation for the return [
{
...baseQueryObject,
metrics,
orderby: orderby.length > 0 ? orderby : undefined,
},
];I have checked the PR comments, and there are no other pending review comments to address. Would you like me to proceed with any other changes? superset-frontend/plugins/legacy-plugin-chart-parallel-coordinates/src/buildQuery.ts |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## remove-legacy-viz-pipeline #41716 +/- ##
==============================================================
- Coverage 64.62% 64.62% -0.01%
==============================================================
Files 2684 2685 +1
Lines 148431 148446 +15
Branches 34249 34253 +4
==============================================================
+ Hits 95930 95938 +8
- Misses 50739 50746 +7
Partials 1762 1762
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:
|
Adds a buildQuery that mirrors the legacy ParallelCoordinatesViz query_obj: series becomes the groupby column, the secondary (color) metric rides along via extractQueryFields' secondary_metric alias, and the sort metric is appended to the select list with ordering applied when order_desc is set. The legacy get_data was a plain records pass-through, so transformProps is unchanged. Saved charts keep working without a DB migration: viz_type is unchanged and legacy granularity_sqla/time_range form data flows through extractExtras. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The legacy pipeline never honored order_by_cols for this chart, so the migrated buildQuery owns the orderby field explicitly rather than inheriting whatever extractQueryFields pulled from residual form data. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
da83575 to
0d50722
Compare
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
…41716) Co-authored-by: Claude Code <noreply@anthropic.com>
SUMMARY
Tier 1 of #41714 (targets
remove-legacy-viz-pipeline): migrate Parallel Coordinates (para) offexplore_jsononto/api/v1/chart/data.buildQuery.tsmirroring the legacyParallelCoordinatesViz.query_obj:series→ groupby column, secondary (color) metric included viaextractQueryFields'secondary_metricalias, sort metric appended to the select list,orderbyapplied whenorder_descis set.useLegacyApi: trueremoved (and the "Legacy" tag dropped from the viz gallery metadata).transformPropsunchanged — the legacyget_data()was a plaindf.to_dict("records")pass-through, which is exactly what the v1 endpoint returns.viz_typeis unchanged, and legacy saved-chart form data (granularity_sqla,time_range) is handled byextractExtras, covered by a test.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
No visual change — same renderer, same data shape, different endpoint.
TESTING INSTRUCTIONS
npm run test -- plugins/legacy-plugin-chart-parallel-coordinates— 7 new buildQuery tests covering series/metrics extraction, secondary metric, sort-metric append/dedup, order_desc, adhoc sort metrics, and legacy granularity_sqla handling.POST /api/v1/chart/datainstead of/superset/explore_json/, with identical rendering.ADDITIONAL INFORMATION
🤖 Generated with Claude Code