EnxDev opened a new pull request, #37135: URL: https://github.com/apache/superset/pull/37135
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY <!--- Describe the change below, including rationale and design decisions --> This PR fixes a regression introduced in Superset 6.0 where time comparison series in Line Charts no longer rendered correctly. The comparison series (e.g., "1 week ago") was appearing as a solid line instead of dashed, and in some cases rendered with disconnected segments. ### Root Cause Instead of using the explicit 'dashed' line style, a numeric `pattern [(patternIncrement % 5) + 1, (patternIncrement % 3) + 1]` was used. This resulted in a `[2, 2]` pattern (2px dash, 2px gap), which was nearly invisible to users. Additionally, the detection logic for time comparison series was incomplete; it only recognized series names with patterns like `"metric__1 week ago"` but missed single-metric cases where the series name is exactly the time offset value (e.g., `"1 week ago"`). ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> - Before <img width="1372" height="775" alt="before" src="https://github.com/user-attachments/assets/201a2f8b-884a-474f-ba9b-d93e1abf7a55" /> - After <img width="1360" height="781" alt="after" src="https://github.com/user-attachments/assets/9f925d1c-129d-435f-b0e7-e961dc95a956" /> ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> - Unit tests added for time comparison series styling - Manual test: Create Line Chart with time comparison enabled - Verify comparison series renders as dashed line - Verify comparison series renders continuously (no gaps) - Test with different comparison types (values, difference, percentage, ratio) ### 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]
