diff --git a/packages/grafana-ui/src/components/uPlot/Plot.tsx b/packages/grafana-ui/src/components/uPlot/Plot.tsx index 28cc4c7e728..d27276ef2d6 100644 --- a/packages/grafana-ui/src/components/uPlot/Plot.tsx +++ b/packages/grafana-ui/src/components/uPlot/Plot.tsx @@ -65,8 +65,8 @@ export class UPlotChart extends Component { }); const config: Options = { - width: this.props.width, - height: this.props.height, + width: Math.floor(this.props.width), + height: Math.floor(this.props.height), ...this.props.config.getConfig(), }; @@ -93,8 +93,8 @@ export class UPlotChart extends Component { if (!sameDims(prevProps, this.props)) { plot?.setSize({ - width: this.props.width, - height: this.props.height, + width: Math.floor(this.props.width), + height: Math.floor(this.props.height), }); } else if (!sameConfig(prevProps, this.props)) { this.reinitPlot();