diff --git a/packages/core/src/model-cartesian-charts.ts b/packages/core/src/model-cartesian-charts.ts index 79a4e21153..b99b8f1fd3 100644 --- a/packages/core/src/model-cartesian-charts.ts +++ b/packages/core/src/model-cartesian-charts.ts @@ -19,12 +19,20 @@ export class ChartModelCartesian extends ChartModel { Tools.getProperty( this.getOptions(), "zoomBar", - "top", + AxisPositions.TOP, "enabled" ) ) { + // get pre-defined zoom bar data + const definedZoomBarData = Tools.getProperty( + this.getOptions(), + "zoomBar", + AxisPositions.TOP, + "data" + ); // if we have zoom bar data we need to update it as well - this.setZoomBarData(); + // with pre-defined zoom bar data + this.setZoomBarData(definedZoomBarData); } }