diff --git a/packages/grafana-ui/src/components/uPlot/config/UPlotAxisBuilder.ts b/packages/grafana-ui/src/components/uPlot/config/UPlotAxisBuilder.ts index 390f3e3fac0..3d8d5972fe1 100644 --- a/packages/grafana-ui/src/components/uPlot/config/UPlotAxisBuilder.ts +++ b/packages/grafana-ui/src/components/uPlot/config/UPlotAxisBuilder.ts @@ -168,7 +168,13 @@ export class UPlotAxisBuilder extends PlotConfigBuilder { } else if (formatValue) { config.values = (u: uPlot, splits, axisIdx, tickSpace, tickIncr) => { let decimals = guessDecimals(roundDecimals(tickIncr, 6)); - return splits.map((v) => formatValue!(v, decimals > 0 ? decimals : undefined)); + return splits.map((v) => { + if (v == null) { + return null; + } else { + return formatValue!(v, decimals > 0 ? decimals : undefined); + } + }); }; }