Added init method to all charts

- Added custom colors to pie chart
This commit is contained in:
Andrés Santibáñez
2021-02-12 00:17:11 -05:00
parent 372d6ffcb0
commit 171a333044
11 changed files with 63 additions and 12 deletions

View File

@@ -18,14 +18,13 @@ const multiColumnChart = () => {
const animated = component.get('columnChartModel.animated');
const onColumnClickEventName = component.get('columnChartModel.onColumnClickEventName')
const dataLabels = component.get('columnChartModel.dataLabels');
const data = component.get('columnChartModel.data');
const sparkline = component.get('columnChartModel.sparkline');
const legend = component.get('columnChartModel.legend')
const colors = component.get('columnChartModel.colors');
const grid = component.get('columnChartModel.grid');
const columnWidth = component.get('columnChartModel.columnWidth');
const horizontal = component.get('columnChartModel.horizontal');
const data = component.get('columnChartModel.data');
const series = Object.keys(data)
.map(seriesName => ({
name: seriesName,
@@ -91,6 +90,8 @@ const multiColumnChart = () => {
},
};
const colors = component.get('columnChartModel.colors');
if (colors && colors.length > 0) {
options['colors'] = colors
}