Apexcharts.js: Can categories be displayed via dataLabels?

Created on 9 Oct 2018  路  5Comments  路  Source: apexcharts/apexcharts.js

I see that series can, but how would I display categories in bar as well?

Most helpful comment

All 5 comments

@diomed I failed to understand what you mean. Can you please elaborate?
Are you looking for something like this?
screen shot 2018-10-09 at 7 27 21 pm

yes

I will put the above example in website demo pages soon.

For now, you can try the following code to achieve the same result

{ 
  plotOptions: {
    bar: {
      horizontal: true,
      dataLabels: {
          position: 'bottom'
      },
    }
  },
  dataLabels: {
    enabled: true,
    textAnchor: 'start',
    style: {
        colors: ['#fff']
    },
    formatter: function(val, opt) {
        return opt.globals.labels[opt.dataPointIndex] + ":  " + val
    },
    offsetX: 0,
  },
  yaxis: {
    labels: {
      show: false
    }
  }
}

thank you for your help 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

drummad picture drummad  路  3Comments

ordago picture ordago  路  3Comments

drew-dulgar picture drew-dulgar  路  3Comments

rudeayelo picture rudeayelo  路  3Comments

thellimist picture thellimist  路  3Comments