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

   ### SUMMARY
   
   On a time-series chart with the default configuration (0° x-axis label 
rotation, a resolved time
   grain), ECharts' native label-collision suppression 
(`axisLabel.hideOverlap`) is disabled. This is a
   deliberate trade-off from a prior fix that guarantees the forced 
boundary/max date label is never
   hidden by ECharts' own overlap detection, but it has the side effect of 
disabling overlap suppression
   for every other tick on the axis too — so dense/closely-spaced time labels 
can render on top of each
   other instead of being thinned or spaced out.
   
   This adds label-level overlap suppression instead of touching the axis-level 
toggle: a shared
   `createSpacedXAxisFormatter` + `getXAxisDomain` pair (`utils/formatters.ts`) 
estimates each label's
   rendered pixel footprint against the available per-tick spacing and blanks a 
label that would
   visually collide with the previously-rendered one, while always keeping the 
forced boundary labels
   visible. `axisLabel.hideOverlap` stays `false` and the existing 
boundary-label regression tests are
   untouched.
   
   Applied identically to `Timeseries` and `MixedTimeseries`, replacing the 
previously duplicated inline
   formatter logic in each (which only deduplicated exact string-duplicate 
labels, not visually-colliding
   ones).
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — this is a label-density/formatter fix validated by unit and 
integration tests; no manual
   screenshots were captured.
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   cd superset-frontend
   npm run test -- plugins/plugin-chart-echarts/test
   ```
   
   New regression tests reproduce dense/closely-spaced time labels for both 
`Timeseries` and
   `MixedTimeseries` (confirmed RED before the fix, GREEN after). Full 
`plugin-chart-echarts` suite:
   994/994 passing.
   
   Manually: create a time-series chart (Line/Area/Bar) with a temporal x-axis 
and a time grain fine
   enough relative to the selected date range that many points/ticks land close 
together (e.g. Day grain
   over several months), leave X-Axis Label Rotation at its default (0°) — 
x-axis labels no longer
   overlap, and the first/last date labels remain visible.
   
   ### 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]

Reply via email to