mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Normalize color string before using them as IDs (#32713)
This commit is contained in:
parent
5289603a59
commit
cf699d8ad1
@ -144,7 +144,7 @@ export const PieChartSvg: FC<SvgProps> = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getValue = (d: FieldDisplay) => d.display.numeric;
|
const getValue = (d: FieldDisplay) => d.display.numeric;
|
||||||
const getGradientId = (color: string) => `${componentInstanceId}-${color}`;
|
const getGradientId = (color: string) => `${componentInstanceId}-${tinycolor(color).toHex()}`;
|
||||||
const getGradientColor = (color: string) => {
|
const getGradientColor = (color: string) => {
|
||||||
return `url(#${getGradientId(color)})`;
|
return `url(#${getGradientId(color)})`;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user