From 3d56257b348f962c6993e6ded33584f7e070e52b Mon Sep 17 00:00:00 2001 From: Adela Almasan <88068998+adela-almasan@users.noreply.github.com> Date: Wed, 8 May 2024 14:14:43 -0600 Subject: [PATCH] Timeseries: Fix incorrect threshold style (#87521) --- .../src/components/uPlot/config/UPlotThresholds.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/grafana-ui/src/components/uPlot/config/UPlotThresholds.ts b/packages/grafana-ui/src/components/uPlot/config/UPlotThresholds.ts index 56e17f47c3f..8be4df87406 100644 --- a/packages/grafana-ui/src/components/uPlot/config/UPlotThresholds.ts +++ b/packages/grafana-ui/src/components/uPlot/config/UPlotThresholds.ts @@ -22,7 +22,7 @@ export function getThresholdsDrawHook(options: UPlotThresholdOptions) { options.config.mode === GraphThresholdsStyleMode.Dashed || options.config.mode === GraphThresholdsStyleMode.DashedAndArea ? [10, 10] - : null; + : []; function addLines(u: uPlot, yScaleKey: string, steps: Threshold[], theme: GrafanaTheme2) { let ctx = u.ctx; @@ -39,10 +39,7 @@ export function getThresholdsDrawHook(options: UPlotThresholdOptions) { } ctx.lineWidth = 2; - - if (dashSegments) { - ctx.setLineDash(dashSegments); - } + ctx.setLineDash(dashSegments); // Ignore the base -Infinity threshold by always starting on index 1 for (let idx = 1; idx < steps.length; idx++) {