Fixed empty dataset not added in Chart at createGraph
This commit is contained in:
@ -458,15 +458,17 @@ let graphs = (function (){
|
||||
for(let e of data.graph[key]){
|
||||
pdata.push({x: e[0]*1000, y: e[1]});
|
||||
}
|
||||
if(pdata.length > 0){
|
||||
addDataset(gindex, key, pdata, dict[key])
|
||||
/*console.log(timeRange);
|
||||
if(data[data.length-1].x-data[0].x > d && data[data.length-1].x-data[0].x < (30*60+10)*1000){ // Adjust to requested time
|
||||
d = data[data.length-1].x-data[0].x
|
||||
max = data[data.length-1].x;
|
||||
min = data[0].x;
|
||||
}*/
|
||||
}
|
||||
|
||||
addDataset(gindex, key, pdata, dict[key])
|
||||
// if(pdata.length > 0){
|
||||
// addDataset(gindex, key, pdata, dict[key])
|
||||
// /*console.log(timeRange);
|
||||
// if(data[data.length-1].x-data[0].x > d && data[data.length-1].x-data[0].x < (30*60+10)*1000){ // Adjust to requested time
|
||||
// d = data[data.length-1].x-data[0].x
|
||||
// max = data[data.length-1].x;
|
||||
// min = data[0].x;
|
||||
// }*/
|
||||
// }
|
||||
}
|
||||
graph.setMinMax(currentMinTime,currentMaxTime);
|
||||
graph.autoScaleIf();
|
||||
|
Reference in New Issue
Block a user