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

Pie Chart Legends

3 Answers 111 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Will
Top achievements
Rank 1
Will asked on 20 Oct 2008, 09:53 AM
Hi there,

I am creating a pie chart using the rad chart.  It is created by databinding a data table to the rad chart and there will be either 1 or 2 series.  The problem I have is the legend is just showing a white dot with the name of the series rather than each item within the series.  So as an example if its just 1 series, and they are sales totals by month.  So you will have 12 segments of varying size and the series title is something like "2008".  I know that I can put labels on the actual pie chart but we would rather have a the legend display the 12 months and their relevant colours.  Does anyone know how to do this?

Thanks

Will

3 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 21 Oct 2008, 05:32 AM
Hello Will,

The LegendDisplayMode will come in handy in this case. Please, find more details in the following help topic:

http://www.telerik.com/help/aspnet-ajax/legenddisplaymode.html

Hope this helps.




Kind regards,
Ves
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Will
Top achievements
Rank 1
answered on 21 Oct 2008, 11:23 AM
Thanks.  I have managed to change the Legend display mode so that it displays the labels but now it is outputting the labels as Item 1, Item 2, Item 3 and so on.  I want it to you use the values from one of the columns in the Datatable that the chart databinds too.  I have specified it with the PlotArea.XAxis.DataLabelsColumn property but I am guessing I have to use something else since there is no X axis.

any ideas?

Thanks

Will
0
Ves
Telerik team
answered on 21 Oct 2008, 11:43 AM
Hi Will,

The value of the ChartSeriesItem.Name property will be displayed in the legend. You can wire ItemDataBound as shown in this blog post and modify the Name property.

Greetings,
Ves
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Chart (Obsolete)
Asked by
Will
Top achievements
Rank 1
Answers by
Ves
Telerik team
Will
Top achievements
Rank 1
Share this question
or