分类:
Jquery
报表中增加节点(chart)
events: { load: function () { //根据数据个数改变(没有数据就不能增加) var servirs = this.series[0]; var servirs1 = this.series[1]; setInterval(function () { servirs.addPoint(Math.round(Math.random() *10), true, true) servirs1.addPoint(Math.round(Math.random() * 10), true, true) }, 1000) } } //数据个数 series: [{ name: '温度', color: '#89A54E', type: 'line', data: [6, 8, 2, 4, 5, 7, 8, 2, 4, 1, 4, 3, 4], tooltip: { valueSuffix: ' °C' } }, { name: '湿度', color: '#abcdef', type: 'line', data: [6, 8, 2, 4, 5, 7, 8, 2, 4, 1, 4, 3, 4], tooltip: { valueSuffix: ' °C' } }]
评价