mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Flamegraph: Fix bug where package colors would be altered after focusin on a node (#75695)
This commit is contained in:
@@ -57,9 +57,9 @@ export function getBarColorByPackage(label: string, theme: GrafanaTheme2) {
|
||||
// TODO: similar thing happens in trace view with selecting colors of the spans, so maybe this could be unified.
|
||||
const hash = murmurhash3_32_gc(packageName || '', 0);
|
||||
const colorIndex = hash % packageColors.length;
|
||||
let packageColor = packageColors[colorIndex];
|
||||
let packageColor = packageColors[colorIndex].clone();
|
||||
if (theme.isLight) {
|
||||
packageColor = packageColor.clone().brighten(15);
|
||||
packageColor = packageColor.brighten(15);
|
||||
}
|
||||
return packageColor;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user