解决echarts图表模糊问题

591 阅读1分钟

使用echarts渲染出的图表和文字出现模糊问题

方法一:使用svg渲染,清晰度高

var myChart = echarts.init(document.getElementById('chart'), null, { renderer: 'svg' })

方法2:canvas渲染,通过调整devicePixelRatio提升清晰度

var myChart = echarts.init(document.getElementById('chart'),null, {devicePixelRatio: 2})