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 = { const config: Options = {
width: this.props.width, width: Math.floor(this.props.width),
height: this.props.height, height: Math.floor(this.props.height),
...this.props.config.getConfig(), ...this.props.config.getConfig(),
}; };
@ -93,8 +93,8 @@ export class UPlotChart extends Component<PlotProps, UPlotChartState> {
if (!sameDims(prevProps, this.props)) { if (!sameDims(prevProps, this.props)) {
plot?.setSize({ plot?.setSize({
width: this.props.width, width: Math.floor(this.props.width),
height: this.props.height, height: Math.floor(this.props.height),
}); });
} else if (!sameConfig(prevProps, this.props)) { } else if (!sameConfig(prevProps, this.props)) {
this.reinitPlot(); this.reinitPlot();