diff --git a/packages/grafana-ui/src/components/uPlot/config/UPlotSeriesBuilder.ts b/packages/grafana-ui/src/components/uPlot/config/UPlotSeriesBuilder.ts index 9fbe511517e..74b4140e23d 100644 --- a/packages/grafana-ui/src/components/uPlot/config/UPlotSeriesBuilder.ts +++ b/packages/grafana-ui/src/components/uPlot/config/UPlotSeriesBuilder.ts @@ -80,19 +80,19 @@ export class UPlotSeriesBuilder extends PlotConfigBuilder { // GraphDrawStyle.Points mode also needs this for fill/stroke sharing & re-use in series.points. see getColor() below. lineConfig.stroke = lineColor; + lineConfig.width = lineWidth; + if (lineStyle && lineStyle.fill !== 'solid') { + if (lineStyle.fill === 'dot') { + lineConfig.cap = 'round'; + } + lineConfig.dash = lineStyle.dash ?? [10, 10]; + } + if (pathBuilder != null) { lineConfig.paths = pathBuilder; - lineConfig.width = lineWidth; } else if (drawStyle === GraphDrawStyle.Points) { lineConfig.paths = () => null; } else if (drawStyle != null) { - lineConfig.width = lineWidth; - if (lineStyle && lineStyle.fill !== 'solid') { - if (lineStyle.fill === 'dot') { - lineConfig.cap = 'round'; - } - lineConfig.dash = lineStyle.dash ?? [10, 10]; - } lineConfig.paths = (self: uPlot, seriesIdx: number, idx0: number, idx1: number) => { let pathsBuilder = mapDrawStyleToPathBuilder( drawStyle,