Skip to content

Commit

Permalink
Possible fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelte Lagendijk committed Oct 17, 2017
1 parent 021f06e commit dff7281
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
"folders": "node ./node_modules/gulp/bin/gulp folders",
"modeler": "node ./node_modules/gulp/bin/gulp modeler"
}
}
}
9 changes: 7 additions & 2 deletions src/ChartJS/widgets/BarChart/widget/BarChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ define([

_processData : function () {
logger.debug(this.id + "._processData");
console.log(this);
var sets = [],
points = null,
set = {
Expand Down Expand Up @@ -58,8 +59,12 @@ define([
label = set.dataset.get(this.datasetlabel);

for (i = 0; i < set.points.length; i++) {
if (!xlabelsSet) {
xlabels.push(((this.scaleShowLabelsBottom === true) ? set.points[i].get(this.seriesxlabel) : ""));
var xlabel = ((this.scaleShowLabelsBottom === true) ? set.points[i].get(this.seriesxlabel) : "");
// if (!xlabelsSet) {
// xlabels.push(xlabel);
// }
if ("" !== xlabel && -1 === xlabels.indexOf(xlabel)) {
xlabels.push(xlabel);
}

points.push(+(set.points[i].get(this.seriesylabel))); // Convert to integer, so the stackedbar doesnt break!
Expand Down
Binary file modified test/widgets/ChartJS.mpk
Binary file not shown.

0 comments on commit dff7281

Please sign in to comment.