codeant-ai-for-open-source[bot] commented on PR #38473:
URL: https://github.com/apache/superset/pull/38473#issuecomment-4029920636
## **Sequence Diagram**
This PR fixes how time-shifted series are detected and mapped back to their
original series so that derived series (like "1 year ago") reuse the same color
as the original for all ECharts timeseries variants, including bar and area
charts.
```mermaid
sequenceDiagram
participant User
participant Frontend
participant Backend
participant ChartTransform
participant TimeOffsetUtils
participant ColorScale
User->>Frontend: Configure timeseries with time compare and match color
Frontend->>Backend: Run query with time comparison offsets
Backend-->>Frontend: Return series data with offset labels
Frontend->>ChartTransform: Render ECharts timeseries chart
ChartTransform->>TimeOffsetUtils: Extract original series key from
series name
TimeOffsetUtils-->>ChartTransform: Original series key for color matching
ChartTransform->>ColorScale: Get color using original series key
ColorScale-->>ChartTransform: Shared color for original and shifted
series
ChartTransform-->>Frontend: Render chart with matching colors for time
shifts
```
---
*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]