Skip to content

Commit

Permalink
Fix issue 4402
Browse files Browse the repository at this point in the history
When determining if the series is stacked, when checking the type of
the series use realIndex.
  • Loading branch information
rosco54 committed Apr 13, 2024
1 parent 9158723 commit 6b71376
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/charts/Line.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class Line {
// the first value in the current series is not null or undefined
let firstPrevY = this.lineHelpers.determineFirstPrevY({
i,
realIndex,
series,
prevY,
lineYPosition,
Expand All @@ -117,6 +118,7 @@ class Line {
if (type === 'rangeArea') {
firstPrevY2 = this.lineHelpers.determineFirstPrevY({
i,
realIndex,
series: seriesRangeEnd,
prevY: prevY2,
lineYPosition,
Expand Down
6 changes: 3 additions & 3 deletions src/charts/common/line/Helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ export default class Helpers {
}
}

determineFirstPrevY({ i, series, prevY, lineYPosition, translationsIndex }) {
determineFirstPrevY({ i, realIndex, series, prevY, lineYPosition, translationsIndex }) {
let w = this.w
let stackSeries =
(w.config.chart.stacked && !w.globals.comboCharts) ||
(w.config.chart.stacked &&
w.globals.comboCharts &&
(!this.w.config.chart.stackOnlyBar ||
this.w.config.series[i]?.type === 'bar'
|| this.w.config.series[i]?.type === 'column'))
this.w.config.series[realIndex]?.type === 'bar'
|| this.w.config.series[realIndex]?.type === 'column'))

if (typeof series[i]?.[0] !== 'undefined') {
if (stackSeries) {
Expand Down

0 comments on commit 6b71376

Please sign in to comment.