Skip to content

Commit

Permalink
fix percent stacking math (issue 41)
Browse files Browse the repository at this point in the history
  • Loading branch information
spasovski committed Mar 29, 2017
1 parent 3414ff7 commit 3fcd07b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/app/visualizations/chart/plotly.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function percentBarStacking(seriesList) {
sum += seriesList[j].y[i];
}
for (let j = 0; j < seriesList.length; j += 1) {
const value = seriesList[j].y[i] / (sum * 100);
const value = seriesList[j].y[i] / sum * 100;
seriesList[j].text.push(`Value: ${seriesList[j].y[i]}<br>Relative: ${value.toFixed(2)}%`);
seriesList[j].y[i] = value;
}
Expand Down

0 comments on commit 3fcd07b

Please sign in to comment.