-1

Highchart expected: [1]: https://i.stack.imgur.com/pXRj8.png

I want to make a Stacked bar like the picture, is it possible? If yes, please give me the solution. Thanks

  • Hi and Welcome to Stackoverflow. Please **do not** ask us to do this for you without showing any efforts or any code attempts. Note that Stackoverflow is **not a free code writing service**, at least show your efforts and attempts in making this. Please read the [How do i ask a good question?](https://stackoverflow.com/help/how-to-ask) and the [What questions are suitable?](https://stackoverflow.com/help/on-topic) section of Stackoverflow. Asking low quality questions like this will end up getting **downvoted** or the question can be closed or deleted. Regards – I_love_vegetables Jul 24 '21 at 02:42

2 Answers2

0

Use stackLabels: https://api.highcharts.com/highcharts/yAxis.stackLabels https://jsfiddle.net/BlackLabel/kcusx40g/

yAxis: {
    stackLabels: {
      enabled: true
    }
}
madepiet
  • 859
  • 1
  • 5
  • 7
0

Here is a response for the problem:https://jsfiddle.net/6pcm4znk/3/

yAxis: {
 gridLineWidth: 0,
 title: {
  text: null
 },
 stackLabels: {
  enabled: true,
  formatter: function() {
    return Highcharts.numberFormat(this.total, null, null, ',');
  },
  style: {
    color: 'white',
    fontWeight: 'normal'
  }
 },
 labels: {
  style: {
    color: 'white'
   },
  formatter: function() {
    return Highcharts.numberFormat(this.value, null, null, ',');
   }
  }
 },