This is a migrated thread and some comments may be shown as answers.

Custom legend

4 Answers 153 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Germaine
Top achievements
Rank 1
Germaine asked on 16 Oct 2008, 08:32 PM
I use a datasource to populate my chart.  From a previous post, I discovered how to use the datacolumn name to populate the legend programmatically.  Can you program the legend so that it shows 2 columns.  Ex. category name and category count and turn off all label on graph?

4 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 20 Oct 2008, 07:10 AM
Hi Germaine,

It is not possible to instruct the legend to display data from two columns automatically. However, you can handle the server-side RadChart.BeforeLayout event and add there as many custom legend items as your scenario requires -- you can see the described approach in action in the attached sample application that we sent you in the other forum thread labelled "Customize Legend Items".

As for the other question -- you can turn off the series item labels by setting ChartSeries.Appearance.ShowLabels property to false for every series you have defined in your chart.


Greetings,
Manuel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Sue
Top achievements
Rank 1
answered on 16 Apr 2009, 04:05 PM
Can you program the legend to display items in more than one column? I have a legend with 7 items, but I'd like them to display as two columns instead of one long column. Is this possible?
0
Giuseppe
Telerik team
answered on 17 Apr 2009, 01:26 PM
Hi Sue,

Unfortunately RadChart does not support such functionality -- you could only customize whether the legend items should be rendered in a single row or column via the RadChart.Legend.Appearance.Overflow property but you cannot customize the number of rows / columns to display.


Kind regards,
Manuel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Sue
Top achievements
Rank 1
answered on 23 Apr 2009, 03:38 PM
I found this post http://www.telerik.com/community/forums/aspnet/chart/label-positioning-below-the-chart.aspx along with your suggestion to use the overflow property which got it working the way I hoped! Thank you!
Tags
Chart (Obsolete)
Asked by
Germaine
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Sue
Top achievements
Rank 1
Share this question
or