Reputation: 355
I'm using highcharts library to output a column chart with 6 categories and 4 series.
I want to display the series name in the datalabel. Now it just gives the number.
I've implemented a temporary solution but its not pretty:
In the best solution, it would have O M G U above the category name, corresponding to the 4 columns per category.
Upvotes: 2
Views: 885
Reputation: 39139
Use the format
option to display series name as a data label, example:
plotOptions: {
column: {
dataLabels: {
...,
verticalAlign: 'bottom',
format: '{point.series.name}'
}
}
}
Live demo: http://jsfiddle.net/BlackLabel/8k5omy6z/
API Reference: https://api.highcharts.com/highcharts/series.column.dataLabels.verticalAlign
Upvotes: 2