Pie chart text colors


#1

Hello everyone,

I am working with a Pie chart that has its metric labels positioned outside .

Is it possible to apply different colors and font styles to these labels? I need to do this to match the colors of a specific company’s brand guide.

Thank you for your help!


#2

I think you are talking about Advanced options, with this you can use directly some e-charts options, like this:

myChart.set('advancedOptions', {
    series: [{
        label: {
            show: true,
            fontSize: 14,
            color: 'red',
            position: 'outside'
        }
    }],
})

#3

It worked perfectly for me, thank you very much :pray:t3:. I just have one more question: Is it possible to place the first value of the results on the right? Right now, it starts at the top.


#4

Of cource you can do that, you need the property startAngle, like this:

myChart.set('advancedOptions', {
    series: [{
        label: {
            show: true,
            fontSize: 14,
            color: 'red',
            position: 'outside'
        },
        startAngle: 0, // 0 puts the first value to the right
    }],
})