Skip to content

Commit

Permalink
Merge pull request #108 from stijnvanouplines/master
Browse files Browse the repository at this point in the history
Added missing jsonConfig
  • Loading branch information
asantibanez authored Nov 7, 2023
2 parents ca04427 + af44417 commit 5a222ab
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion public/app.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion resources/js/areaChart.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { mergedOptionsWithJsonConfig } from './helpers'

const areaChart = () => {
return {
Expand All @@ -20,6 +21,7 @@ const areaChart = () => {
const onPointClickEventName = component.get('areaChartModel.onPointClickEventName')
const data = component.get('areaChartModel.data');
const sparkline = component.get('areaChartModel.sparkline');
const jsonConfig = component.get('areaChartModel.jsonConfig');

const categories = component.get('areaChartModel.xAxis.categories').length > 0
? component.get('areaChartModel.xAxis.categories')
Expand Down Expand Up @@ -88,7 +90,7 @@ const areaChart = () => {

};

this.chart = new ApexCharts(this.$refs.container, options);
this.chart = new ApexCharts(this.$refs.container, mergedOptionsWithJsonConfig(options, jsonConfig));
this.chart.render();
}
}
Expand Down
4 changes: 3 additions & 1 deletion resources/js/lineChart.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { mergedOptionsWithJsonConfig } from './helpers'

const lineChart = () => {
return {
Expand All @@ -20,6 +21,7 @@ const lineChart = () => {
const data = component.get('lineChartModel.data');
const onPointClickEventName = component.get('lineChartModel.onPointClickEventName');
const sparkline = component.get('lineChartModel.sparkline');
const jsonConfig = component.get('lineChartModel.jsonConfig');

const series = [{
name: title,
Expand Down Expand Up @@ -108,7 +110,7 @@ const lineChart = () => {
},
};

this.chart = new ApexCharts(this.$refs.container, options);
this.chart = new ApexCharts(this.$refs.container, mergedOptionsWithJsonConfig(options, jsonConfig));
this.chart.render();
}
}
Expand Down
4 changes: 3 additions & 1 deletion resources/js/multiColumnChart.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { mergedOptionsWithJsonConfig } from './helpers'

const multiColumnChart = () => {
return {
Expand All @@ -24,6 +25,7 @@ const multiColumnChart = () => {
const grid = component.get('columnChartModel.grid');
const columnWidth = component.get('columnChartModel.columnWidth');
const horizontal = component.get('columnChartModel.horizontal');
const jsonConfig = component.get('columnChartModel.jsonConfig');

const data = component.get('columnChartModel.data');
const series = Object.keys(data)
Expand Down Expand Up @@ -100,7 +102,7 @@ const multiColumnChart = () => {
options['colors'] = colors
}

this.chart = new ApexCharts(this.$refs.container, options);
this.chart = new ApexCharts(this.$refs.container, mergedOptionsWithJsonConfig(options, jsonConfig));
this.chart.render();
}
}
Expand Down
4 changes: 3 additions & 1 deletion resources/js/multiLineChart.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { mergedOptionsWithJsonConfig } from './helpers'

const multiLineChart = () => {
return {
Expand All @@ -20,6 +21,7 @@ const multiLineChart = () => {
const data = component.get('lineChartModel.data');
const onPointClickEventName = component.get('lineChartModel.onPointClickEventName');
const sparkline = component.get('lineChartModel.sparkline');
const jsonConfig = component.get('lineChartModel.jsonConfig');

const series = Object.keys(data).map(key => {
return {
Expand Down Expand Up @@ -84,7 +86,7 @@ const multiLineChart = () => {
options['colors'] = colors
}

this.chart = new ApexCharts(this.$refs.container, options);
this.chart = new ApexCharts(this.$refs.container, mergedOptionsWithJsonConfig(options, jsonConfig));
this.chart.render();
}
}
Expand Down
4 changes: 3 additions & 1 deletion resources/js/radarChart.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { mergedOptionsWithJsonConfig } from './helpers'

const radarChart = () => {
return {
Expand All @@ -21,6 +22,7 @@ const radarChart = () => {
const data = component.get('radarChartModel.data');
const sparkline = component.get('radarChartModel.sparkline');
const colors = component.get('radarChartModel.colors');
const jsonConfig = component.get('radarChartModel.jsonConfig');

const series = Object.keys(data)
.map(seriesName => ({
Expand Down Expand Up @@ -88,7 +90,7 @@ const radarChart = () => {

};

this.chart = new ApexCharts(this.$refs.container, options);
this.chart = new ApexCharts(this.$refs.container, mergedOptionsWithJsonConfig(options, jsonConfig));
this.chart.render();
}
}
Expand Down
4 changes: 3 additions & 1 deletion resources/js/treeMapChart.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { mergedOptionsWithJsonConfig } from './helpers'

const treeMapChart = () => {
return {
Expand All @@ -21,6 +22,7 @@ const treeMapChart = () => {
const data = component.get('treeMapChartModel.data');
const colors = component.get('treeMapChartModel.colors');
const enableShades = component.get('treeMapChartModel.enableShades');
const jsonConfig = component.get('treeMapChartModel.jsonConfig');

const series = Object.keys(data)
.map(seriesName => ({
Expand Down Expand Up @@ -69,7 +71,7 @@ const treeMapChart = () => {
colors: colors,
};

this.chart = new ApexCharts(this.$refs.container, options);
this.chart = new ApexCharts(this.$refs.container, mergedOptionsWithJsonConfig(options, jsonConfig));
this.chart.render();
}
}
Expand Down

0 comments on commit 5a222ab

Please sign in to comment.