This question is locked. New answers and comments are not allowed.
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.
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
0
Hi David,
Rositsa Topchiyska
Telerik
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.
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
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
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
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(series, point 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
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(series, point 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.