function drawPie(el, seriesData, seriesName, colors){ var myCharts = echarts.init(document.getElementById(el)); var options = { tooltip : { trigger: 'item', formatter: "{a}
{b} : {c} ({d}%)" }, color: colors, series : [ { name: seriesName, type: 'pie', radius: '55%', center: ['50%', '60%'], label: { formatter: '{b}: {c} ({d}%)' }, data: seriesData, hoverAnimation: false } ] }; document.getElementById(el).removeAttribute("_echarts_instance_"); myCharts.setOption(options); } function drawLine(el, xData, yDatas, color, legend){ var myCharts = echarts.init(document.getElementById(el)); var options = { tooltip: { trigger: 'axis' }, color: color, grid: { left: '10px', right: '25px', bottom: '10px', top: '10px', containLabel: true }, xAxis: { type: 'category', data: xData, boundaryGap: false, splitLine:{show: false} }, yAxis: { type: 'value', splitLine:{show: false} }, }; var series = []; for(i=0; i