Fixed introduced bug where line plot was not moving

pull/18/head
Sami Mokaddem 2017-10-20 17:09:01 +02:00
parent 79c845835f
commit 7ddd9bb092
1 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
var maxNumPoint = 60;
var emptyArray = [];
for(i=0; i<maxNumPoint; i++) {
emptyArray.push([i, 0]);
}
class Sources { class Sources {
constructor() { constructor() {
this._sourcesArray = {}; this._sourcesArray = {};
@ -8,7 +14,7 @@ class Sources {
} }
addSource(sourceName) { addSource(sourceName) {
this._sourcesArray[sourceName] = []; this._sourcesArray[sourceName] = emptyArray;
this._sourcesCount[sourceName] = 0; this._sourcesCount[sourceName] = 0;
this._sourcesCountMax[sourceName] = 0; this._sourcesCountMax[sourceName] = 0;
this._sourceNames.push(sourceName); this._sourceNames.push(sourceName);
@ -64,7 +70,7 @@ class Sources {
} }
getEmptyData() { getEmptyData() {
return [{label: 'no data', data: []}]; return [{label: 'no data', data: emptyArray}];
} }
} }