Skip to content

Commit

Permalink
fix: dont calculate offsets if graph is not layed out yet
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Apr 29, 2024
1 parent c2da060 commit f81a8a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui-chart/charts/BarLineChartBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ export abstract class BarLineChartBase<U extends Entry, D extends IBarLineScatte
}

public calculateOffsets(force = true) {
if (this.offsetsCalculated && !force) {
if (!this.viewPortHandler.hasChartDimens || (this.offsetsCalculated && !force)) {
return;
}
this.offsetsCalculated = true;
Expand Down

0 comments on commit f81a8a6

Please sign in to comment.