TD - 折线图模板
//加载折线图
load_line_diagram:function(){
var item = {};
var myChart = easy7.line.init(document.getElementById('lineDiagram'));
//横轴
var xData = ["1","2","3","4","5","6","7","8","9","10","11","12"];
//纵轴
var yData = [];
var item1 = [1,2,3,4,5,6,7,8,9,1,1,2];//第一条线的内容
var item2 = [11,12,13,14,15,16,17,18,9,11,3,2];//第二条线的内容
yData[0] = item1;
yData[1] = item2;
item.xData = xData;
item.yData = yData;
item.name = "item.name";
item.legend = [this.nls.TODAY,this.nls.MONTH];//线条名称
var option = {
title: {
x: 'left',
text: "",
show:false
},
toolbox: {
show: false,
feature: {
dataView: {show: true, readOnly: false},
restore: {show: true},
saveAsImage: {show: true}
}
}
};
easy7.initEChartsLinesOption(option,item);
// 为echarts对象加载数据
myChart.setOption(option);
},