SBIN2010 opened a new pull request, #45172: URL: https://github.com/apache/superset/pull/45172
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY <!--- Describe the change below, including rationale and design decisions --> This continues the work in #32346 and follows the request in discussion #27012 to hide the All/Inv legend buttons. Those buttons are shown on ECharts legends by default, and there was no chart option to turn them off. #32346 added a checkbox for this, but it was closed before merge. Chart options now include **Show All/Invert buttons in legend**, stored as `show_selector_legend`. It is visible only while the legend itself is shown, and it defaults to on so existing charts keep the buttons. The control lives in the shared legend section, so it applies to the ECharts charts that use that section: timeseries (line, smooth, bar, area, scatter, step), mixed timeseries, pie, radar, funnel, graph, bubble, butterfly, candlestick, and Gantt. Histogram does not use that section, so the same checkbox is added next to its existing legend control. Turning the checkbox off hides the buttons on the native ECharts legend and on the custom HTML legend used by plain top/bottom timeseries. The layout no longer reserves space for those buttons. Charts saved before this field existed still show the buttons. Funnel no longer drops a legend row by a fixed index. The row is removed by control name (`legendOrientation`), so inserting this checkbox does not shift which control disappears. That replaces the old `splice(2, 1)`, which removed the legend type control. New strings are added to `superset/translations/messages.pot`. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> <img width="2190" height="1248" alt="Снимок экрана от 2026-10-10 18-55-33" src="https://github.com/user-attachments/assets/3b1c31dd-a835-4581-b54d-6f4c035b6c21" /> <img width="2190" height="1248" alt="Снимок экрана от 2026-10-10 18-55-42" src="https://github.com/user-attachments/assets/1541d902-f884-4811-b7bd-b8f2f45c8f7c" /> ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> 1. Open Explore and create or edit an ECharts chart that shows a legend (for example a time-series line, a pie, and a histogram). 2. In Chart options, under Legend, confirm **Show All/Invert buttons in legend** appears only when **Show legend** is checked. 3. With the checkbox on, confirm the All/Invert buttons are visible. 4. Turn the checkbox off and run the query. The buttons disappear and the rest of the legend stays. On a plain top or bottom timeseries legend, the HTML All/Inverse buttons disappear as well and the plot does not keep an empty gap for them. 5. Turn the legend off and confirm the All/Invert checkbox is hidden. 6. Open a saved chart that has no `show_selector_legend` in its form data and confirm the buttons are still shown. 7. Open a funnel chart and confirm the legend controls are the ones the funnel panel is supposed to show. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] 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 - [x ] 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]
