Hi!
I have a simple pyramid rendered using highcharts.
In this pyramid in each of the sections I want the datalabels to be within the sections themselves but also, if the text is too long for the width of the section the text should wrap to the next line.
Important things to note:
* I can't hard code widths to the datalabels since the size of the pyramid will be variable.
* I want to apply styling to the datalabel via css which I am doing like so:
formatter(format: any) {
// This will determine whether the font color should be black or white depending on the background color
const fontColor = Color.getFontColor(this.point.color);
return (
'<span style="color: ' +
fontColor +
'" class="datalabel">' +
this.key +
'</span>'
);
}
This seems like it should be simple to achieve but I'm drawing a blank.
FYI I have used the solution for placing the datalabels within the sections that was posted here:
https://forum.highcharts.com/post120241 ... 62#p120241
TIA
Jane