[Bug] UI - Trace List View: Service Color Inconsistency Between Graph Nodes and Service Labels
Search before asking
- [x] I had searched in the issues and found no similar issues.
Apache SkyWalking Component
UI (apache/skywalking-booster-ui)
What happened
In the trace list view, the color of each service node in the D3 graph is determined by the index of the service in a deduplicated list generated from the graph's internal data (this.list = Array.from(new Set(this.row.map(i => i.serviceCode))) in d3-trace-list.ts). However, the service labels above the graph use a separate deduplicated list generated from the component's props (Array.from(new Set(props.data.map(i => i.serviceCode))) in List.vue). If the order of services in these two lists is different, the same service may be assigned different colors in the graph and in the label, causing a mismatch.
What you expected to happen
The color of each service should be consistent between the graph nodes and the service labels. The same service should always have the same color in both places.
How to reproduce
- Open the trace list view for a trace that contains multiple services.
- If the order of services in the deduplicated list from row (used by the D3 graph) differs from the order in the deduplicated list from props.data (used by the labels), the color mapping will be inconsistent.
- You may observe that the color of a service node in the graph does not match the color of its corresponding label.
Anything else
No response
Are you willing to submit a pull request to fix on your own?
- [ ] Yes I am willing to submit a pull request on my own!
Code of Conduct
- [x] I agree to follow this project's Code of Conduct