From 6f00bc5674d994cb85716610807e4b4f3e232fbf Mon Sep 17 00:00:00 2001 From: Leon Sorokin Date: Wed, 23 Nov 2022 21:55:30 -0600 Subject: [PATCH] Heatmap: Fix blurry text & rendering (#59260) --- packages/grafana-ui/src/components/uPlot/Plot.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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();