rusackas opened a new pull request, #41729:
URL: https://github.com/apache/superset/pull/41729
### SUMMARY
Tier 4 of #41714 (targets `remove-legacy-viz-pipeline`): migrate the
**Partition Chart (`partition`)** off `explore_json` onto `/api/v1/chart/data`.
This was the largest `viz.py` transform left.
- New `buildQuery.ts` mirroring `PartitionViz.query_obj`: grouped query,
`is_timeseries` only for time-based options, legacy sort-metric append/orderby.
- `transformData` ports the full `get_data` dispatch:
- `not_time`/`agg_sum`/`agg_mean` → `levels_for` + `nest_values`
(summed/averaged hierarchy, dim-path names at deeper levels, sorted group
indexes);
- `time_series` → same nesting with the timestamp prepended as the first
level;
- `point_diff`/`point_factor`/`point_percent` → `levels_for_diff` (last vs
first time grain, pandas `fill_value=0` semantics for grouped rows, plain
arithmetic at the top level);
- `adv_anal` → `levels_for_time` + `nest_procs` (per-timestamp pivot
summed with missing combos filled as 0, rolling mean/sum/std/cumsum with
`min_periods` trimming, contribution row-normalization per level).
- `useLegacyApi: true` removed (and the "Legacy" tag dropped).
- **No DB migration**: `viz_type` unchanged; legacy
`granularity_sqla`/`time_range` handled by `extractExtras`.
### 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-partition` — 13 Jest tests
covering every time-series option (hierarchy shape and values, mean vs sum,
point comparisons incl. missing-side fill, timestamp-first nesting, period
analysis with cumsum and contribution, groupby validation, query shapes).
- Manual: open a saved Partition Chart in each time-series mode; network tab
shows `POST /api/v1/chart/data`; rendering identical.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Introduces new feature or API
- [x] Removes existing feature or API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]