I would like to place a title in the center of a pie/donut chart in HighCharts.
I don\'t see anything in the chart options that would directly enable this, so I\'m t
I found this works when there is a legend and you set the text you want in the centre of the chart as the title:
events: {
load: function() {
const titleHeight = this.title.getBBox().height;
this.title.attr({
y: this.plotHeight / 2 + titleHeight / 2,
});
},
redraw: function() {
const titleHeight = this.title.getBBox().height;
this.title.attr({
y: this.plotHeight / 2 + titleHeight / 2,
});
},
},