Merge branch 'master' into theme-mods

This commit is contained in:
/SyntaxLexx
2023-06-10 03:44:07 +03:00
committed by GitHub
12 changed files with 11684 additions and 22 deletions

View File

@@ -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),
@@ -76,6 +78,13 @@ const pieChart = () => {
theme: component.get('pieChartModel.theme') || {},
tooltip: {
y: {
formatter: function(value, series) {
return data[series.dataPointIndex].extras.tooltip || value;
}
}
},
};
const colors = component.get('pieChartModel.colors');
@@ -84,7 +93,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();
}
}