diff --git a/src/modules/Core.js b/src/modules/Core.js index a1e55f55f..d013059a6 100644 --- a/src/modules/Core.js +++ b/src/modules/Core.js @@ -561,7 +561,7 @@ export default class Core { } setupBrushHandler() { - const { w } = this + const { ctx, w } = this if (!w.config.chart.brush.enabled) return @@ -570,7 +570,7 @@ export default class Core { ? w.config.chart.brush.targets : [w.config.chart.brush.target] targets.forEach((target) => { - const targetChart = ApexCharts.getChartByID(target) + const targetChart = ctx.constructor.getChartByID(target) targetChart.w.globals.brushSource = this.ctx if (typeof targetChart.w.config.chart.events.zoomed !== 'function') { @@ -585,7 +585,7 @@ export default class Core { w.config.chart.events.selection = (chart, e) => { targets.forEach((target) => { - const targetChart = ApexCharts.getChartByID(target) + const targetChart = ctx.constructor.getChartByID(target) targetChart.ctx.updateHelpers._updateOptions( { xaxis: {