From 8a4a68cf9536968465ef338d7d7da296c3f1dd0d Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 20:19:24 +0100 Subject: [PATCH] [release-12.0.1] XYChart: Coerce threshold steps to numbers (#104492) XYChart: Coerce threshold steps to numbers (#104485) (cherry picked from commit a6735721bf1ffddf8d40d56aea3133decc1dac88) Co-authored-by: Leon Sorokin --- public/app/plugins/panel/xychart/scatter.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/panel/xychart/scatter.ts b/public/app/plugins/panel/xychart/scatter.ts index d7bb53a3838..e9f36d8ed73 100644 --- a/public/app/plugins/panel/xychart/scatter.ts +++ b/public/app/plugins/panel/xychart/scatter.ts @@ -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';