Atul
Atul

Reputation: 21

Show label for each bar in highcharts

How can I show labels for each bar in Highcharts as shown in the image below?

enter image description here

Upvotes: 0

Views: 976

Answers (2)

pawel_d
pawel_d

Reputation: 3070

You can set overflow to 'none' and crop to false to be able to display data labels out of the area plot.

API Reference:
http://api.highcharts.com/highcharts/plotOptions.series.dataLabels.crop http://api.highcharts.com/highcharts/plotOptions.series.dataLabels.overflow

Example:
http://jsfiddle.net/5m0kkbhf/

Upvotes: 1

Strikers
Strikers

Reputation: 4776

I think the solution you are looking is some thing like this.

This canbe achieved using the datalabels and placing them properly at the position you have desired to.

plotOptions: {
        column: {
        dataLabels: {
            enabled: true,
          y: 0,
          verticalAlign: 'bottom',
          inside: true,
          color: 'white',
          formatter: function(e) {
            return this.series.name
          }
        }
      }
    },

Upvotes: 1

Related Questions