Skip to content

Commit

Permalink
Merge pull request #1195 from dannyvankooten/develop
Browse files Browse the repository at this point in the history
Bugfix: only calculate high low from stacked values if stackMode is accumulate
  • Loading branch information
gionkunz authored Nov 1, 2019
2 parents de6345e + 6288745 commit e7e7820
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/charts/bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
var seriesGroup = this.svg.elem('g');
var labelGroup = this.svg.elem('g').addClass(options.classNames.labelGroup);

if(options.stackBars && data.normalized.series.length !== 0) {
if(options.stackBars && (options.stackMode === 'accumulate' || !options.stackMode) && data.normalized.series.length !== 0) {

// If stacked bars we need to calculate the high low from stacked values from each series
var serialSums = Chartist.serialMap(data.normalized.series, function serialSums() {
Expand Down

0 comments on commit e7e7820

Please sign in to comment.