[release-12.0.1] XYChart: Coerce threshold steps to numbers (#104492)

XYChart: Coerce threshold steps to numbers (#104485)

(cherry picked from commit a6735721bf)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
This commit is contained in:
grafana-delivery-bot[bot]
2025-04-24 20:19:24 +01:00
committed by GitHub
co-authored by Leon Sorokin
parent 2fbb2d6f5d
commit 8a4a68cf95
+2 -1
View File
@@ -641,7 +641,8 @@ function fieldValueColors(f: Field, theme: GrafanaTheme2): FieldColorValues {
let lasti = steps.length - 1;
for (let i = lasti; i > 0; i--) {
conds += `v >= ${steps[i].value} ? ${i} : `;
let rhs = Number(steps[i].value);
conds += `v >= ${rhs} ? ${i} : `;
}
conds += '0';