Skip to content

Commit d3782d4

Browse files
committed
fix: check for axis enabled
1 parent 6f3317e commit d3782d4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/charting/charts/HorizontalBarChart.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,12 @@ export class HorizontalBarChart extends BarChart {
9292
}
9393

9494
protected prepareValuePxMatrix() {
95-
this.mRightAxisTransformer.prepareMatrixValuePx(this.mAxisRight.mAxisMinimum, this.mAxisRight.mAxisRange, this.mXAxis.mAxisRange, this.mXAxis.mAxisMinimum);
96-
this.mLeftAxisTransformer.prepareMatrixValuePx(this.mAxisLeft.mAxisMinimum, this.mAxisLeft.mAxisRange, this.mXAxis.mAxisRange, this.mXAxis.mAxisMinimum);
95+
if (this.mAxisRight.isEnabled()) {
96+
this.mRightAxisTransformer.prepareMatrixValuePx(this.mAxisRight.mAxisMinimum, this.mAxisRight.mAxisRange, this.mXAxis.mAxisRange, this.mXAxis.mAxisMinimum);
97+
}
98+
if (this.mAxisLeft.isEnabled()) {
99+
this.mLeftAxisTransformer.prepareMatrixValuePx(this.mAxisLeft.mAxisMinimum, this.mAxisLeft.mAxisRange, this.mXAxis.mAxisRange, this.mXAxis.mAxisMinimum);
100+
}
97101
}
98102

99103
protected getMarkerPosition(high: Highlight) {

0 commit comments

Comments
 (0)