Echarts 实现温度计

先上图

Echarts 实现温度计_第1张图片 

 

var dom1 = document.getElementById('mainOne')

 核心代码

 setTemperature(){
        var dom1 = document.getElementById('mainOne')
        var dom2 = document.getElementById('mainTwo')
        var dom3 = document.getElementById('mainThree')
        var myChart = echarts.init(dom1, null, {
          renderer: 'canvas',
          useDirtyRect: false
        })
        var myChart2 = echarts.init(dom2, null, {
          renderer: 'canvas',
          useDirtyRect: false
        })
        

你可能感兴趣的:(Canvas,echarts,前端,javascript)