Skip to content

Commit

Permalink
Flamegraph: Fix bug where package colors would be altered after focus…
Browse files Browse the repository at this point in the history
…in on a node (#75695)
  • Loading branch information
aocenas authored Sep 29, 2023
1 parent 61b856c commit bc9dd47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/grafana-flamegraph/src/FlameGraph/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit bc9dd47

Please sign in to comment.