Heatmap: Fix blurry text & rendering (#59260)

This commit is contained in:
Leon Sorokin 2022-11-23 21:55:30 -06:00 committed by GitHub
parent f4574f098d
commit 6f00bc5674
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,8 +65,8 @@ export class UPlotChart extends Component<PlotProps, UPlotChartState> {
});
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<PlotProps, UPlotChartState> {
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();