justinpark opened a new pull request, #38866:
URL: https://github.com/apache/superset/pull/38866
### SUMMARY
fixes #38639
When using multiple time comparison offsets (e.g. 1 year ago, 2 years ago)
in the Timeseries chart, all comparison series were assigned visually similar
dash patterns, making them hard to distinguish. This fix ensures each
time-shifted series gets a unique combination of dash pattern and marker symbol.
Changes:
- Replaced the old numeric [dash, gap] pattern generation with a curated
visibleDashPatterns array ('dashed', 'dotted', [6, 15], [2, 10], [20, 3])
that are visually distinct from each other
- Added visibleSymbols (rect, triangle, diamond, roundRect, pin) so each
time-shifted series also gets a unique data point marker, providing a second
visual differentiator beyond color
- Dash pattern and symbol assignment now only applies when timeShiftColor
is enabled (previously applied unconditionally to any derivedSeries)
- Fixed tooltip markers to render the correct symbol shape per series
(instead of always rendering a circle) using a new getSymbolMarker() helper
- Added color field to ForecastValue type to pass series color into the
tooltip renderer
- Updated existing tests to include timeShiftColor: true and reflect the
new pattern expectations; added a new test verifying that multiple offsets
receive distinct patterns and symbols
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
<img width="732" height="904" alt="Image"
src="https://github.com/user-attachments/assets/c6894e9f-a63c-41e4-9cb8-ba0c667cfbca"
/>
After:
<img width="1019" height="895" alt="Screenshot 2026-03-25 at 5 03 07 PM"
src="https://github.com/user-attachments/assets/e0cf8caf-d997-4bdf-a726-9f5bd04a40da"
/>
### TESTING INSTRUCTIONS
1. Create a line chart
2. Set multiple time shift (i.e. 1 year ago, 2 year ago, 3 year ago)
3. Each time shift line is represented with the same color and dashed style,
making it difficult to distinguish between them.
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] 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]