mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Thresholds: fix crash when trying to render zero-height base thresholds (#45256)
This commit is contained in:
@@ -134,6 +134,10 @@ export function scaleGradient(u: uPlot, scaleKey: string, scaleStops: ScaleValue
|
||||
|
||||
let range = minStopPos - maxStopPos;
|
||||
|
||||
if (range === 0) {
|
||||
return scaleStops[maxStopIdx!][1];
|
||||
}
|
||||
|
||||
let x0, y0, x1, y1;
|
||||
|
||||
if (u.scales.x!.ori === ScaleOrientation.Horizontal) {
|
||||
|
||||
Reference in New Issue
Block a user