Looking to create a unique stacked Highcharts bar chart with custom text within each bar, but currently only seeing the data number displayed by Highcharts.
Check out the fiddle here.
Here's the code snippet:
$(function () {
$('#container').highcharts({
chart: {
type: 'bar'
},
title: {
text: 'Stacked bar chart'
},
xAxis: {
categories: ['Apples', 'Oranges']
},
yAxis: {
min: 0,
title: {
text: 'Total fruit consumption'
}
},
legend: {
reversed: true
},
plotOptions: {
series: {
stacking: 'normal'
},
bar: {
dataLabels: {
enabled: true
}
}
},
series: [{
name: 'John',
data: [['test 1', 5], ['test 2', 3]]
}, {
name: 'Jane',
data: [['test 3', 2], ['test 4', 2]]
}]
});
});
The goal is to show 'test 1', 'test 2' etc. within the bar chart (currently visible on the popover), rather than just displaying the data numbers like 5, 3, 2, and 2. Is there a way to achieve this?