I attempted to create a bar chart using Highcharts, and initially it worked fine. However, I encountered an issue when displaying multiple indicators - the datalabels for certain data points are hidden. For example, the datalabel for "provinsi aceh" is not visible:
How can I adjust the settings so that all datalabels appear without overlapping each other? Note that the maximum number of indicators is 4.
Below is the code for my graph:
Highcharts.chart(chartId, {
chart: {
type: 'column'
},
title: {
text: chartname,
align: 'center'
},
plotOptions: {
series: {
pointPadding: 0.4,
groupPadding: 0.1
}
},
tooltip: {
shared: true,
},
xAxis: {
type: 'category',
},
plotOptions: {
series: {
borderWidth: 0,
dataLabels: {
enabled: true
}
}
},
series: grafikmaindata,
drilldown: seriessubgrafik[0],
exporting: {
buttons: {
copyToClipboard: {
text: 'Copy Chart',
_titleKey: 'contextButtonTitle',
align: 'right',
onclick: function () {
// Call the function to copy the chart to the clipboard
copyHtmlToClipboard(this.container);
},
}
}
}
});