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

Legend control on RadCartesianChart

5 Answers 123 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 2
David asked on 06 Oct 2013, 09:14 PM
Hi,

I'm writing a Windows Phone 8 app and am using a RadCartesianChart with 2 different LineSeries in it.

Is it possible to add a legend onto the chart with some text identifying what each LineSeries represents?

Thanks.

Dave.

5 Answers, 1 is accepted

Sort by
0
Rosy Topchiyska
Telerik team
answered on 10 Oct 2013, 10:01 AM
Hi David,

Thank you for the question.

Unfortunately, this version of the chart does not support legend. Still we think that this would be useful feature and I have logged it in our Ideas & Feedback Portal where you and our community can vote for it - the higher the demand, the higher the priority.

Please, feel free to contact us again should you have any other questions or ideas.

Regards,
Rositsa Topchiyska
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Nino
Top achievements
Rank 1
answered on 29 Dec 2013, 03:39 PM
Are there any suggestions how to manually implement a legend to a chart?
0
Rosy Topchiyska
Telerik team
answered on 02 Jan 2014, 03:43 PM
Hello Nino,

Thank you for the question.

I have attached a sample application with the simplest possible implementation of a chart legend. If you have more specific requirements, do not hesitate to contact us.

Regards,
Rositsa Topchiyska
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Nino
Top achievements
Rank 1
answered on 04 Jan 2014, 11:49 AM

Hi Rositsa

Thanks for your sample project. The only thing missing know is that I can bind the color of the series to the legend. The scenario would be that I have a pie chart and use the color palette. The amount of data is dynamicly bound. So I would need a way to get information out of the series of the chart.



0
Rosy Topchiyska
Telerik team
answered on 09 Jan 2014, 12:29 PM
Hello Nino,

Thank you for the question.

I have attached a runnable sample application that demonstrates how to implement a legend for RadPieChart.

For the legend I use an ItemsControl and set its ItemsSource to the DataPoints collection of the chart Series. Each data point has a DataItem property that is the underlying item from the view model. Via a value converter using the ChartPalette.GetEntry(seriespoint index) method you can get the corresponding palette color for each data point. You will also need to reset the ItemsSource of the legend each time you add/remove point in order to update the legend.

I hope this should give you a basic idea of how you can implement a legend. Please, do not hesitate to contact us if you have further questions.

Regards,
Rositsa Topchiyska
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
Chart
Asked by
David
Top achievements
Rank 2
Answers by
Rosy Topchiyska
Telerik team
Nino
Top achievements
Rank 1
Share this question
or