jesperct opened a new pull request, #42046: URL: https://github.com/apache/superset/pull/42046
### SUMMARY On a time-based x-axis, line/bar/area charts only forced the **trailing** boundary label to stay visible (`showMaxLabel`). When the first data point falls between ECharts' auto-generated "nice" ticks (for example a mid-year month at Month grain), the axis-min date got no label at all, so the **beginning date was missing** from the axis while the end date stayed. This forces the min boundary label too (`showMinLabel` / `alignMinLabel`), symmetric to the max. A second issue surfaced once the min label was forced: the shared boundary-dedup formatter (which suppresses a duplicate label at the axis boundary) blanked it. ECharts formats axis labels in repeated ascending passes, and the dedup state carried across the pass boundary, so when the min and max format to the same string (a range that starts and ends in the same month, e.g. "May" to "May"), the min label in the second pass was suppressed by the max from the first. The dedup now resets when the ascending sequence restarts. Both `Timeseries` (line/bar/area) and `MixedTimeseries` share this code and are fixed. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Line chart, Month grain, a range that starts mid-year (May 2003 to May 2005). **Before** — the first label is `July`; the beginning date (May) is missing:  **After** — the beginning date (`May`) renders at the left edge:  ### TESTING INSTRUCTIONS 1. Create a **Line Chart** on a dataset with a temporal column whose data starts mid-period (not on a year boundary), e.g. the examples `cleaned_sales_data` with `order_date`. 2. Set the x-axis to the temporal column, **Time Grain = Month**, and a range that starts mid-year (e.g. a filter `2003-05-01 ≤ order_date < 2005-06-01`). 3. **Update chart.** Before this change the first x-axis label is a later "nice" tick and the beginning date is missing; after, the beginning date renders at the left edge. Automated: `Timeseries/transformProps.test.ts` asserts `showMinLabel` is forced for time grains, and that the dedup keeps the forced min label when the endpoints format identically. The full `plugin-chart-echarts` suite passes. ### 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]
