Skip to content

Commit

Permalink
Merge pull request #4884 from SmithKy3/fix/remove-use-of-global-apexc…
Browse files Browse the repository at this point in the history
…harts-class

Remove use of global `ApexCharts` class
  • Loading branch information
junedchhipa authored Dec 19, 2024
2 parents b9858b0 + 0fd0910 commit 641fd9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/Core.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ export default class Core {
}

setupBrushHandler() {
const { w } = this
const { ctx, w } = this

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

Expand All @@ -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') {
Expand All @@ -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: {
Expand Down

0 comments on commit 641fd9d

Please sign in to comment.