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

   I’ve implemented legend double click feature that isolate a series. This was 
a nice feature we like from legacy charts, and our team was sad it is gone 
after echarts migration.
   
   Note: This is a mostly vibe coded PR but I've tested all changed chart. 
Below description is also generated by ai. 
   
   <!---
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   Adds double-click on chart legends for ECharts-based charts: double-click a 
legend item to show only that series; double-click the same item again to show 
all series again. Single-click behavior is unchanged (toggle one series on/off).
   
   Implementation is centralized in useLegendEventHandlers in the ECharts 
plugin. Legend clicks are held briefly so a double-click is not treated as two 
single clicks (which would re-render mid-gesture and break scrolling legends). 
Legend All / Inverse still update immediately.
   
   Scrolling legends keep their page via legendIndex / scrollDataIndex, and 
legend scroll animation is disabled so the legend does not slide when state 
updates.
   
   Charts wired through this hook include Bubble, Butterfly, Funnel, Gantt, 
Graph, Histogram, Mixed Timeseries, Pie, Radar, Timeseries, and Waterfall.
   
   
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   [Screencast From 2026-09-23 
09-58-26.webm](https://github.com/user-attachments/assets/58c5924a-1220-4e72-967d-9a094ce4458c)
   
   ### TESTING INSTRUCTIONS
   1. Open a dashboard or Explore chart with multiple series and a visible 
legend (e.g. Timeseries line, Pie, Mixed chart).
   2. Single click a legend item — only that series toggles; behavior should 
match master.
   3. Double click a legend item — all other series hide; only the clicked 
series remains.
   4. Double click the same item again — all series show again.
   5. On a chart with many series and a scroll legend, go to page 2, 
double-click an item there — isolation works and the legend stays on the same 
page.
   6. Use legend All and Inverse — selection updates immediately.
   
   ### 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
   
   Note: Timeseries charts with a Plain top/bottom HTML legend still isolate 
correctly on double-click; the legend label may grey out slightly later (~300 
ms) than on canvas legends because React legend state updates after the click 
debounce. Scroll-type legends and other chart types update visually with 
ECharts as before.
   


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