2、复杂折线图
代码如下:
var dom = document.getElementById("container");
var myChart = echarts.init(dom);
var app = {};
option = null;
$.get('data/asset/data/aqi-beijing.json', function (data) {
myChart.setOption(option = {
title: {
text: 'Beijing AQI'
},
tooltip: {
trigger: 'axis'
},
xAxis: {
data: data.map(function (item) {
return item[0];
})
},
yAxis: {
splitLine: {
show: false
}
},
toolbox: {
left: 'center',
feature: {
dataZoom: {
yAxisIndex: 'none'
},
restore: {},
saveAsImage: {}
}
},
dataZoom: [{