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

   ### SUMMARY
   
   Follow-up to #45850, as noted in its review.
   
   #45850 sizes the x-axis label spacing on Timeseries charts with the grid's 
actual plot width (`width - padding.left - padding.right`), so the forced 
first/last date labels don't overlap their neighbours. Mixed Timeseries still 
estimated the plot width as `width - 2 * gridOffsetLeft`. That ignores a second 
y-axis, axis titles and a side legend, so on a narrowed plot the spacing check 
overestimated the room and kept labels that overlap.
   
   The spaced formatter in `MixedTimeseries/transformProps.ts` was built before 
`chartPadding` existed. This builds it after `chartPadding` and uses `width - 
chartPadding.left - chartPadding.right`, matching Timeseries.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not applicable; same behavior as the Timeseries fix in #45850.
   
   ### TESTING INSTRUCTIONS
   
   - `npm run test -- plugins/plugin-chart-echarts`: 1618 tests pass. The new 
Mixed Timeseries test mirrors #45850's Timeseries padding test: with a 500px 
y-axis title margin the middle label is dropped. It fails without this change.
   - Manually: a Mixed Timeseries chart with a wide y-axis title margin (or a 
secondary y-axis) and Adaptive x-axis formatting no longer shows the boundary 
date labels overlapping their neighbours.
   
   ### 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]

  • [PR] fix(ec... villebro (via GitHub) via notifications
    • Re: [P... codecov[bot] (via GitHub) via notifications
    • Re: [P... codeant-ai-for-open-source[bot] (via GitHub) via notifications

Reply via email to