Skip to content

Commit

Permalink
fix: set definedZoomBarData to zoom bar data (#909)
Browse files Browse the repository at this point in the history
Co-authored-by: carbon-bot <[email protected]>
  • Loading branch information
hlyang397 and carbon-bot authored Jan 7, 2021
1 parent a39aa16 commit d446e47
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/core/src/model-cartesian-charts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit d446e47

Please sign in to comment.