返回顶部

vue——使用echart后,字体模糊问题

搬运自: https://www.jianshu.com/p/47325792a61c

 

解决方法:

1. 使用 svg 渲染,svg 渲染出的图表的清晰度高于 canvas

const myChart = this.$echarts.init(document.getElementById('myChart'), null, {renderer: 'svg'});

 

2. 仍然使用 canvas 渲染,通过调整 devicePixelRatio 提升清晰度

const myChart = this.$echarts.init(document.getElementById('chart'), null, {devicePixelRatio: 2.5});

 

posted @ 2021-07-01 16:39  前端-xyq  阅读(851)  评论(0编辑  收藏  举报