Skip to content

Commit 46a351b

Browse files
committed
Merge branch 'master' into custom-tooltip
2 parents 4c877f0 + 46de30b commit 46a351b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Blazor-ApexCharts/wwwroot/js/blazor-apex-charts.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@
4848
},
4949

5050
updateOptions(id, options, redrawPaths, animate, updateSyncedCharts) {
51-
var data = JSON.parse(options);
51+
var data = JSON.parse(options, (key, value) =>
52+
(key === 'formatter' || key === 'custom') && value.length !== 0 ? eval("(" + value + ")") : value
53+
);
5254
var chart = this.findChart(id);
5355
if (chart !== undefined) {
5456
this.LogMethodCall(chart, "updateOptions", options);
@@ -259,4 +261,4 @@
259261
console.log('Chart ' + options.chart.id + ' rendered');
260262
}
261263
}
262-
}
264+
}

0 commit comments

Comments
 (0)