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

   fix(echarts): enable scroll legend for horizontal layouts to prevent overlap
   
   ### SUMMARY
   Charts with many legend items can overlap or obscure the chart area when the 
legend is placed at the top or bottom. ECharts supports a scrollable legend, 
which prevents this issue by allowing legend items to scroll instead of 
expanding into the chart.
   
   This PR introduces a sensible default:
   - For horizontal legend orientations (`Top` and `Bottom`), if the 
user-selected legend type is `Plain`, it is automatically upgraded to `Scroll`.
   - Vertical legends (Left/Right) remain unchanged.
   - ECharts will only display scroll arrows when legend content overflows, so 
charts with small legends remain visually identical.
   
   This prevents legend overlap without requiring additional configuration from 
users.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!-- Not required for small UI logic changes -->
   N/A — behavior change is internal (scroll arrows appear only when needed).
   
   ### TESTING INSTRUCTIONS
   1. Create a chart with many series/dimensions so that the legend contains 
many items.
   2. Place the legend at the top or bottom.
   3. BEFORE: The legend overlaps the chart area.
   4. AFTER: The legend automatically becomes scrollable, preventing overlap.
   5. For charts with only a few legend items, verify that the legend appears 
unchanged (scroll arrows do not show unless needed).
   
   Type checking and frontend linting pass locally, and CI runs full Jest suite.
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: Fixes #33880
   - [ ] Required feature flags:
   - [x] Changes UI (legend behavior)
   - [ ] Includes DB Migration
   - [ ] 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