Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed Oct 25, 2024
1 parent fc5284d commit 38e2718
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/charts/common/line/Helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,22 @@ export default class Helpers {
}
}

determineFirstPrevY({ i, realIndex, 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[realIndex]?.type === 'bar'
|| this.w.config.series[realIndex]?.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 All @@ -127,8 +134,10 @@ export default class Helpers {
prevY =
lineYPosition -
series[i][0] / this.lineCtx.yRatio[translationsIndex] +
(this.lineCtx.isReversed
? series[i][0] / this.lineCtx.yRatio[translationsIndex] : 0) * 2
(this.lineCtx.isReversed
? series[i][0] / this.lineCtx.yRatio[translationsIndex]
: 0) *
2
} else {
// the first value in the current series is null
if (stackSeries && i > 0 && typeof series[i][0] === 'undefined') {
Expand Down

0 comments on commit 38e2718

Please sign in to comment.