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

   ### SUMMARY
   
   On Timeseries-family charts with **Zoomable** enabled, the zoom toolbox
   (`zoom area` / `restore zoom`) and the legend both render in the chart's
   top-right corner, and they overlap — see #37286.
   
   `getLegendProps` reserves `TIMESERIES_CONSTANTS.legendTopRightOffset` px of
   clearance at the right edge for a top-oriented legend when `zoomable` is set.
   That was 55px. Measuring what ECharts 6 actually renders, the toolbox's two
   dataZoom icons occupy from **67px to 20px** in from the right edge (the
   component rect reaches 82px). So the legend's right edge — which includes its
   own All/Inv selector buttons, since `ScrollableLegendView.layoutInner` folds
   the selector group into the legend's `mainRect` — landed roughly 12px inside
   the icon band.
   
   This raises `legendTopRightOffset` to 90, clearing the icons with margin.
   
   The offset also feeds `getHorizontalLegendAvailableWidth`, so plain legends
   get a correspondingly more accurate wrap estimate for zoomable charts.
   
   Note: the earlier #38657 addressed the bottom dataZoom slider offset, which 
is
   a different control and not what this issue reports.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   <!-- Attach before/after of a zoomable Timeseries chart with enough series to
        show the legend selector next to the zoom icons. -->
   
   ### TESTING INSTRUCTIONS
   
   1. Create a Time-series Line Chart with enough series that the legend
      paginates (default legend type "Scroll", position "Top").
   2. In Customize, enable **Zoomable**.
   3. Confirm the `zoom area` / `restore zoom` icons in the top-right no longer
      sit under the legend's All/Inv buttons, and both remain clickable.
   4. Toggle Zoomable off and confirm the legend still extends to the right 
edge.
   
   Unit tests:
   
   ```bash
   cd superset-frontend
   npm run test -- plugins/plugin-chart-echarts/test/utils/series.test.ts
   ```
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: Fixes #37286
   - [ ] 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