How To Display Total Count Of All The Bar Values At The Top- Highcharts Colum- React Highhcharts
I want to display total count at the top in a stacked grouped column chart: http://jsfiddle.net/hgq495up/1/ code: chart: { type: 'column' }, title: {
Solution 1:
I see that you use the stackLabels
in a different purpose - to show the label name for the stacked columns. So, to replace the stackLabels
we can use the dataLabels
formatted in the proper way.
Demo: http://jsfiddle.net/BlackLabel/amjg7031/
dataLabels: {
enabled: true,
verticalAlign: 'top',
y: -20,
overflow: "none",
formatter: function() {
let plotSize = this.series.chart.plotSizeY;
if (this.point.yBottom !== plotSize) {
returnthis.point.stackTotal;
}
}
}
Post a Comment for "How To Display Total Count Of All The Bar Values At The Top- Highcharts Colum- React Highhcharts"