We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Legend RepresentationType

Hello, Just out of curiousity, why are there differences in the values you can pick in ChartLegendItemType and ChartLegendRepresentationType? For instance, in ChartLegendItemType there is Spline, but not in ChartLegendRepresentationType. If I want to set the legend representation type to spline do I have to go through each of the legend items and set e.Items[i].Type? Thanks, Nick

5 Replies

GM Geetha M Syncfusion Team March 14, 2006 01:48 PM UTC

Hi Nick, ChartLegendRepresentationType enumeration has symbols,series type and series image as its members. When you set the legend representation it will affect all the legends in the collection. Individual series types are not included in the Representation type because changing the representation type will change the legend type not for the individual series but for the entire collection. When a series is drawn, the legend picks up its item type (as the Representation type is set to Series Type) from the ChartLegendItemType enumerations. It is possible to set the legend item type for each series by setting the series.LegendItem type as appropriate. Note: This feature is available with the latest release of Essential Studio which is available for download in the thread linked below: http://www.syncfusion.com/Support/forums/message.aspx?MessageID=41784 Please let me know if this helps you. Thanks and Regards, Geetha.


PG Peggy Giegucz November 10, 2009 12:12 AM UTC

I found my crashing problem. I commented out a line of code:

series.LegendItem.ShowIcon = false;

Not sure why that caused problems. Any idea?

But now I have a slight aesthetic problem. I'm creating legends with two rows - mostly to save horizontal space. It was simple to embed a into the legend.

But to get the spacing right I need:

chart.Legend.ItemsSize = new Size(20, 20);

That makes a big chunky color chip. Is there any way that I can slim down my rectangle to make it better looking?


PG Peggy Giegucz November 10, 2009 12:13 AM UTC

Attachment



sf2_d1329a1d.zip


PG Peggy Giegucz November 10, 2009 12:15 AM UTC

Sorry, posted in the wrong thread


VV Venkata Vijayaraj B Syncfusion Team November 10, 2009 11:30 AM UTC

Hi Peggy,

It is OK.

Thanks for the update.

Regards,
Venkat.

Loader.
Live Chat Icon For mobile
Up arrow icon