Skip to content

Commit 413a34b

Browse files
author
Jelte Lagendijk
committed
Fix rendering for empty datasets
1 parent 205f6a2 commit 413a34b

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

src/ChartJS/widgets/BarChart/widget/BarChart.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ define([
5050
for (k = 0; k < maxpoints; k++) {
5151
points.push(0);
5252
}
53-
logger.debug(this.id + " - empty dataset");
53+
logger.warn(this.id + " - empty dataset");
54+
continue;
5455
}
5556

5657
set.points = this._sortArrayMx(set.points, this.sortingxvalue);

src/ChartJS/widgets/LineChart/widget/LineChart.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ define([
5050
for (k = 0; k < maxpoints; k++) {
5151
points.push(0);
5252
}
53-
logger.debug(this.id + " - empty dataset");
53+
logger.warn(this.id + " - empty dataset");
54+
continue;
5455
}
5556

5657
set.points = this._sortArrayMx(set.points, this.sortingxvalue);

src/ChartJS/widgets/RadarChart/widget/RadarChart.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ define([
5252
for(k=0; k < maxpoints; k++) {
5353
points.push(0);
5454
}
55-
console.log(this.id + " - empty dataset");
55+
logger.warn(this.id + " - empty dataset");
56+
continue;
5657
}
5758

5859
set.points = this._sortArrayMx(set.points, this.sortingxvalue);

src/ChartJS/widgets/StackedBarChart/widget/StackedBarChart.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ define([
5151
for(k=0; k < maxpoints; k++) {
5252
points.push(0);
5353
}
54-
console.log(this.id + " - empty dataset");
54+
logger.warn(this.id + " - empty dataset");
55+
continue;
5556
}
5657

5758
set.points = this._sortArrayMx(set.points, this.sortingxvalue);

test/widgets/ChartJS.mpk

39 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)