Template:HFUT-china/v1Js

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

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

   title : {
       text: 'Among the three main functions of BioDesigner,which one do you think is most useful?',
       x:'center',
       textStyle:{
           fontSize:13,
       }
   },
   tooltip : {
       trigger: 'item',
       formatter: "{a} 
{b} : {c} ({d}%)" }, legend: { orient: 'vertical', x: 'right', // 'center' | 'left' | {number}, y: 'center', // 'center' | 'bottom' | {number} data: ['Search','Recommendation','Literature Analysis'] }, series : [ { name: 'Access Sources', type: 'pie', radius : '55%', center: ['50%', '60%'], data:[ {value:50, name:'Literature Analysis'}, {value:25, name:'Recommendation'}, {value:25, name:'Search'}, ], itemStyle: { emphasis: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } } } ]

};

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