lines to bar

描述:当前是关于Echarts图表中的 示例。
 
            option = {
    xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        data: [820, 932, 901, 934, 1290, 1330, 1320],
        type: 'bar',
        universalTransition:{
           enabled: true
        }
    }]
};


setInterval(()=>{
   const type = option.series[0].type
   option.series[0].type =type === 'line' ? 'bar' : 'line';
myChart.setOption(option);
},2000)