Chart legend symbol and label

Hi,

Please see the attached file.

This is regards to the legend symbol where the default quarter circle, I want to replace this into full circle.

using the code below, I manage to show the circle but still keeping the default.

                item.ItemStyle.Symbol.Shape = ChartSymbolShape.Circle;
                item.ItemStyle.ShowSymbol = true;
                item.ItemStyle.Symbol.Color = Color.Blue;

next is the series.ConfigItems.PieItem.LabelStyle = ChartAccumulationLabelStyle.Outside;
this label can I convert this into percent?

Attachment: legendsymbol_6011c31f.7z

1 Reply 1 reply marked as answer

SM Saravanan Madheswaran Syncfusion Team May 31, 2021 10:13 AM UTC

HI Mark,  
 
Greetings from Syncfusion support.  
 
We would like to let you know that we are able to remove the default legend symbol by setting RepresentationType of legend as None.  
 
chartControl2.Legend.RepresentationType = ChartLegendRepresentationType.None; 
 
foreach (var item in chartControl2.Legend.Items) 
    item.ItemStyle.Symbol.Shape = ChartSymbolShape.Circle; 
    item.ItemStyle.ShowSymbol = true; 
    item.ItemStyle.Symbol.Color = Color.Blue; 
 
And we can customize each point label individually by below.  
 
for (int i = 0; i < chartSeries1.Points.Count; i++) 
    //Customizing the label text 
    chartSeries1.Styles[i].Text = chartSeries1.Points[i].YValues[0] + " %"
 
 
Regards, 
Saravanan. 


Marked as answer
Loader.
Up arrow icon