在初始化echarts的方法中 添加 devicePixelRatio: dpr
,代码如下:
const [ec, setEc] = useState<any>({
// 初始化图表
onInit: (canvas, width, height, dpr) => {
chart = echarts.init(canvas, null, {
width,
height,
devicePixelRatio: dpr,
});
canvas.setChart(chart);
return chart;
},
});
标签:canvas,dpr,微信,chart,ec,图表,width
From: https://www.cnblogs.com/ZerlinM/p/17440174.html