Added sparkline feature to charts

This commit is contained in:
Andrés Santibáñez
2020-11-09 08:29:43 -05:00
parent f5b40ec73d
commit 8e9aed484e
8 changed files with 89 additions and 31 deletions

View File

@@ -20,6 +20,7 @@
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 options = {
series: [{ data: data.map(item => item.value)}],
@@ -28,13 +29,11 @@
type: 'bar',
height: '100%',
toolbar: {
show: false
},
...sparkline,
animations: {
enabled: animated,
},
toolbar: { show: false },
animations: { enabled: animated },
events: {
dataPointSelection: function(event, chartContext, config) {