Reputation: 755
I'm using Highcharts 4.15 and I would like to display stack label for my wind rose chart, but it doen't work as I expected. Here an example: http://jsfiddle.net/Paulson/xdvaecff/
yAxis: {
stackLabels: {
enabled: true
}
}
I would like to have them near the end of each 'petal', but they appear in the left bottom corner. Is there any fix or workaround?
Upvotes: 0
Views: 120
Reputation: 12472
It looks like in a polar chart stack labels are forgotten at all (bug reported here).
As a workaround, you can use data labels which are positioned correctly. Enabling data labels for the most upper series and returning the stack's total value in the formatter callback do the work.
series: [{
...
}, {
...
dataLabels: {
enabled: true,
formatter: function () {
return this.total;
}
}
}]
In your case, you load data from csv and reverse stacking is disabled, so you can enable dataLabels for the last series in the complete callback:
complete: function (options) {
options.series[options.series.length - 1].dataLabels = {
enabled: true,
formatter: function () {
return this.total;
}
}
}
Example: http://jsfiddle.net/xdvaecff/1/
Upvotes: 1