Skip to content

Commit 641fd9d

Browse files
authored
Merge pull request #4884 from SmithKy3/fix/remove-use-of-global-apexcharts-class
Remove use of global `ApexCharts` class
2 parents b9858b0 + 0fd0910 commit 641fd9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/modules/Core.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ export default class Core {
561561
}
562562

563563
setupBrushHandler() {
564-
const { w } = this
564+
const { ctx, w } = this
565565

566566
if (!w.config.chart.brush.enabled) return
567567

@@ -570,7 +570,7 @@ export default class Core {
570570
? w.config.chart.brush.targets
571571
: [w.config.chart.brush.target]
572572
targets.forEach((target) => {
573-
const targetChart = ApexCharts.getChartByID(target)
573+
const targetChart = ctx.constructor.getChartByID(target)
574574
targetChart.w.globals.brushSource = this.ctx
575575

576576
if (typeof targetChart.w.config.chart.events.zoomed !== 'function') {
@@ -585,7 +585,7 @@ export default class Core {
585585

586586
w.config.chart.events.selection = (chart, e) => {
587587
targets.forEach((target) => {
588-
const targetChart = ApexCharts.getChartByID(target)
588+
const targetChart = ctx.constructor.getChartByID(target)
589589
targetChart.ctx.updateHelpers._updateOptions(
590590
{
591591
xaxis: {

0 commit comments

Comments
 (0)