echarts line chart segmented to display different colors

var weiChart = echarts.init(document.getElementById('box'));
option = {
   title: {
       text: 'Line chart stacking'
   },
   tooltip: {
       trigger: 'axis'
   },
   legend: {
       data:['email marketing','affiliate advertising','video advertising','direct access','search engine']
   },
   grid: {
       left: '3%',
       right: '4%',
       bottom: '3%',
       containLabel: true
   },
   toolbox: {
       feature: {
           saveAsImage: {}
       }
   },
   xAxis: A
       type: 'category',
       boundaryGap: false,
       data: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday']
   },
   yAxis: {
       type: 'value'
   },
   series: [
       {
           name:'',
           type:'line',        
           data:[120, 132, 191, "-", "-", "-", "-"]
       },
       {
           name:'',
           type:'line',      
           data:["-", "-", 191, 234, 190, "-", "-"]
       },
       {
           name:'',
           type:'line',
           data:["-", "-", "-", "-", 190, 330, 410]
       },

   ]
};




        weiChart.setOption(option);



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325763011&siteId=291194637