diff --git a/resources/js/pieChart.js b/resources/js/pieChart.js index 144f239..5f61bb9 100644 --- a/resources/js/pieChart.js +++ b/resources/js/pieChart.js @@ -1,3 +1,4 @@ +import {mergedOptionsWithJsonConfig} from './helpers' const pieChart = () => { return { @@ -21,6 +22,7 @@ const pieChart = () => { const data = component.get('pieChartModel.data') const sparkline = component.get('pieChartModel.sparkline') const type = component.get('pieChartModel.type') + const jsonConfig = component.get('pieChartModel.jsonConfig'); const options = { series: data.map(item => item.value), @@ -89,7 +91,7 @@ const pieChart = () => { options['colors'] = colors } - this.chart = new ApexCharts(this.$refs.container, options); + this.chart = new ApexCharts(this.$refs.container, mergedOptionsWithJsonConfig(options, jsonConfig)); this.chart.render(); } }