mirror of https://github.com/MISP/misp-dashboard
Fixed introduced bug where line plot was not moving
parent
79c845835f
commit
7ddd9bb092
|
@ -1,3 +1,9 @@
|
|||
var maxNumPoint = 60;
|
||||
var emptyArray = [];
|
||||
for(i=0; i<maxNumPoint; i++) {
|
||||
emptyArray.push([i, 0]);
|
||||
}
|
||||
|
||||
class Sources {
|
||||
constructor() {
|
||||
this._sourcesArray = {};
|
||||
|
@ -8,7 +14,7 @@ class Sources {
|
|||
}
|
||||
|
||||
addSource(sourceName) {
|
||||
this._sourcesArray[sourceName] = [];
|
||||
this._sourcesArray[sourceName] = emptyArray;
|
||||
this._sourcesCount[sourceName] = 0;
|
||||
this._sourcesCountMax[sourceName] = 0;
|
||||
this._sourceNames.push(sourceName);
|
||||
|
@ -64,7 +70,7 @@ class Sources {
|
|||
}
|
||||
|
||||
getEmptyData() {
|
||||
return [{label: 'no data', data: []}];
|
||||
return [{label: 'no data', data: emptyArray}];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue