I looked at some better plug-ins, such as echarts (Baidu Charts), but I couldn’t read more than 10,000 lines of code. Finally, I found a solution https://www.zhihu.com/questio... let width = canvas.width,height=canvas.height; if (window.devicePixelRatio) {
You can try doubling the canvas resolution first and take a look.
Assume the display size is w * h:
Set the width and height of canvas to 2w and 2h
Set the width and height in the canvas style to w and h
I looked at some better plug-ins, such as echarts (Baidu Charts), but I couldn’t read more than 10,000 lines of code. Finally, I found a solution
https://www.zhihu.com/questio...
let width = canvas.width,height=canvas.height;
if (window.devicePixelRatio) {
}
I would like to share this with children’s shoes who encounter the same problem