Merge pull request #108 from stijnvanouplines/master

Added missing jsonConfig
This commit is contained in:
Andrés Santibáñez
2023-11-07 14:40:56 -05:00
committed by GitHub
7 changed files with 19 additions and 7 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,4 @@
import { mergedOptionsWithJsonConfig } from './helpers'
const areaChart = () => {
return {
@@ -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')
@@ -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();
}
}

View File

@@ -1,3 +1,4 @@
import { mergedOptionsWithJsonConfig } from './helpers'
const lineChart = () => {
return {
@@ -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,
@@ -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();
}
}

View File

@@ -1,3 +1,4 @@
import { mergedOptionsWithJsonConfig } from './helpers'
const multiColumnChart = () => {
return {
@@ -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)
@@ -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();
}
}

View File

@@ -1,3 +1,4 @@
import { mergedOptionsWithJsonConfig } from './helpers'
const multiLineChart = () => {
return {
@@ -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 {
@@ -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();
}
}

View File

@@ -1,3 +1,4 @@
import { mergedOptionsWithJsonConfig } from './helpers'
const radarChart = () => {
return {
@@ -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 => ({
@@ -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();
}
}

View File

@@ -1,3 +1,4 @@
import { mergedOptionsWithJsonConfig } from './helpers'
const treeMapChart = () => {
return {
@@ -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 => ({
@@ -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();
}
}