var realTimeDataUrl = this.config[‘realTimeDataUrl‘];
var chartContainer = this.config[‘chartContainerId‘];
var series = that._getDataOfDisplayChart(data, tag, temp);
if ( this.timeCounterId ){
clearInterval(this.timeCounterId);
}
var chartConfig = {
chart: {
type: ‘spline‘,
animation: Highcharts.svg,
marginRight: 10,
events: {
load: function () {
// set up the updating of the chart each second
var series = this.series;
that.timeCounterId = setInterval(function(){
that._load(realTimeDataUrl, function(data){
for ( var key in data){
var value = data[key];
var ip = value[‘ip‘];
var i = temp[ip];
var serie = series[i];
if ( serie ){
var x = value.runtime * 1000;
// var x = (new Date()).getTime();
var y = parseFloat(value[tag]);
serie.addPoint([x, y], true, false);
}
var tplId = this.config[‘tplId‘];
var container = this.config[‘containerId‘];
var radios = [];
var filter = {
ip: true,
runtime: true
};
var item = data[0];