How to add a label above each bar in HighCharts
highcharts, javascript, jquery
Solution
Highcharts stackLabels will do the work. See here
Problem
I'm trying to put a label within a bar chart in Highcharts. In my case above each bar which you can see here: ``` $(function () { var chart; $(document).ready(function() { chart = new Highcharts.Chart({ chart: { renderTo: 'container', type: 'column' }, title: { text: 'Indicator per Sex' }, xAxis: { categories: [ 'Jan', 'Fev', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dez' ] }, yAxis: { allowDecimals: false, min: 0, title: { text: 'Consults' } }, tooltip: { formatter: function() { return '<b>'+ this.x +'</b><br/>'+ this.series.name +': '+ this.y +'<br/>'+ 'Total: '+ this.point.stackTotal; } }, plotOptions: { column: { stacking: 'normal' } }, series: [ { data: [29.9, 71.5, 106.4, 129.2, 144.0, 29.9, 71.5, 106.4, 129.2, 144.0, 10, 20], color: '#FF0011', stack: 0 }, { data: [30, 176.0, 135.6, 148.5, 216.4, 29.9, 71.5, 106.4, 129.2, 144.0, 10, 20], color: '#3333FF', stack: 0 }, { data: [29.9, 71.5, 106.4, 129.2, 144.0, 29.9, 71.5, 106.4, 129.2, 144.0, 10, 20], color: '#FF0011', stack: 1 }, { data: [30, 176.0, 135.6, 148.5, 216.4, 29.9, 71.5, 106.4, 129.2, 144.0, 10, 20], color: '#3333FF', stack: 1 }, { data: [29.9, 71.5, 106.4, 129.2, 144.0, 29.9, 71.5, 106.4, 129.2, 144.0, 10, 20], color: '#FF0011', stack: 2 }, { data: [30, 176.0, 135.6, 148.5, 216.4, 29.9, 71.5, 106.4, 129.2, 144.0, 10, 20], color: '#3333FF', stack: 2 }] }); }); });` ``` I tried, but when I add labels appear one label each bar. So, how do this?!