jesperct opened a new pull request, #41749:
URL: https://github.com/apache/superset/pull/41749

   ### SUMMARY
   
   When a chart's legend **Type** is set to **List** (plain), Superset could 
silently override that choice and render a scrollable, paginated legend 
instead. Whenever a plain legend was estimated not to fit in the available 
space, the shared legend-layout helper flipped `legend.type` from `plain` to 
`scroll`. The visible effect: picking **List** and clicking **Update chart** 
appeared to do nothing for charts with many series — the legend stayed a 
single-row scroll paginator.
   
   This change makes an explicit **List** selection authoritative. The layout 
helper now always keeps `legend.type: 'plain'` when the user picks List. The 
margin reservation that shrinks the plot area to reduce legend clipping (added 
alongside the original auto-flip) is kept, so long legends still get vertical 
room reserved for them without overriding the user's choice.
   
   The fix lives in the shared `getLegendLayoutResult` helper, so it applies to 
every ECharts chart that routes through it (Timeseries line/bar, Pie, Bubble, 
Funnel, Graph, Gantt). No form-data migration is needed — the stored option 
value `plain` is unchanged.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Line chart, 50 series, legend **Type = List**, orientation Top.
   
   **Before** — List selection silently flipped to a single-row Scroll 
paginator (`◀ 1/7 ▶`):
   
   <!-- drag before-scroll-flip.png here -->
   
   **After** — List honored, full multi-row legend:
   
   <!-- drag after-list-honored.png here -->
   
   ### TESTING INSTRUCTIONS
   
   1. Create a **Line Chart** on the examples `birth_names` dataset. Set X-axis 
`ds`, metric `sum__num`, and Dimensions `name` with **Series limit 50** so the 
legend has many entries.
   2. Open the **Customize** tab, set **Legend Type = List** and **Legend 
Orientation = Top**, then click **Update chart**.
   3. **Before this change:** the legend collapses to a single row with scroll 
arrows (paginated). **After:** the legend renders as a full multi-row list.
   
   Automated coverage: `plugins/plugin-chart-echarts/test/utils/series.test.ts` 
plus the per-chart `transformProps` tests (Timeseries, Pie, Gantt, Bar) assert 
an explicit List selection is preserved and a finite margin is reserved. Full 
plugin suite passes (639 tests).
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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]

Reply via email to