Template:HFUT-china/v7Js

// 基于准备好的dom,初始化echarts实例 var myChart = echarts.init(document.getElementById('v7'));

// 指定图表的配置项和数据 var option = {

   tooltip: {
       trigger: 'axis'
   },
   legend: {
       data:['Backward','Forward']
   },
   grid: {
       left: '3%',
       right: '4%',
       bottom: '3%',
       containLabel: true
   },
   toolbox: {
       feature: {
           saveAsImage: {}
       }
   },
   xAxis: {
       type: 'category',
       data: ['1','2','3','4','5']
   },
   yAxis: {
       type: 'value'
   },
   series: [
       {
           name:'Backward',
           type:'line',
           data:[92.04,87.61,91.76,79.58,75.15]
       },
       {
           name:'Forward',
           type:'line',
           data:[89.96,85.47,80.04,77.88,71.36]
       }
   ]

};

// 使用刚指定的配置项和数据显示图表。 myChart.setOption(option);