codeant-ai-for-open-source[bot] commented on PR #38473:
URL: https://github.com/apache/superset/pull/38473#issuecomment-4054488897
## **Sequence Diagram**
This PR fixes time shift color matching by normalizing additional derived
series name patterns before color assignment. As a result, original and
time-shifted series now resolve to the same color key across line, bar, and
area charts.
```mermaid
sequenceDiagram
participant User
participant Backend
participant Transform
participant TimeOffsetUtil
participant ColorScale
User->>Backend: Request timeseries with time compare
Backend-->>Transform: Return original and shifted series names
Transform->>TimeOffsetUtil: Detect offset and strip offset patterns
TimeOffsetUtil-->>Transform: Return normalized base series key
Transform->>Transform: Remove metric prefix for single metric with
dimensions
Transform->>ColorScale: Get color by normalized key
ColorScale-->>Transform: Same color for original and shifted series
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
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]