Turning to Assad Saiduddin, the answer :
I use dataLabels in a donut pie chart, and the proposed solution was very specific for a singular situation. I wanted to change the colors of the text labels for individual pieces of cake based on conditional logic, comparing the values.
Just share it because my search brought me here.
data: outerData, dataLabels: { formatter: function () { if ((outerData[this.point.x].y > innerData[this.point.x].y) && (this.point.x != 0)) { return this.y > 0.1 ? '<span style="fill: red;">' + this.point.name + ': ' + this.y + '% ' + '</span>' : null; } else { return this.y > 0.1 ? '<span style="fill: #006400;">' + this.point.name + ': ' + this.y + '% ' + '</span>' : null; } } }
source share