Border color slice of Pie Chart

Hello,

I have a Pie Chart with custom color for each slice of chart, it possible change color border 

to distinguish the different slices with adjacent equal colors ?

Thank


1 Reply

DG Durga Gopalakrishnan Syncfusion Team April 4, 2022 02:16 PM UTC

Hi Luigi,


Greetings from Syncfusion.


We suggest you to use OnPointRender event to change the border color of each slice. Please check with the below snippet and sample.


<SfAccumulationChart>

   <AccumulationChartEvents OnPointRender="PointRender"></AccumulationChartEvents>

</SfAccumulationChart>

@code{

    public int Count = 0;

    public String[] Colors = new String[] { "red", "blue", "green", "yellow", "orange", "aqua" };

 

    public void PointRender(AccumulationPointRenderEventArgs args)

    {

        if (Count == 6)

            Count = 0;

        args.Border.Color = Colors[Count];

        Count++;

    }

}




Sample : https://www.syncfusion.com/downloads/support/directtrac/general/ze/SliceBorder-1439723538.zip


Kindly revert us if you have any concerns.


Regards,

Durga G.


Loader.
Up arrow icon