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

How to set legend settings in radchartview from code behind

1 Answer 103 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Chinmaya
Top achievements
Rank 1
Chinmaya asked on 19 Aug 2014, 01:11 PM
I am new to silverlight and telerik I have similar problem like "legend
not showing " . I have done most of the things from code behind as i am
not much comfortable with xaml. I have one base chart from which other
chart are inherited  and in code sets there properties.



i also trying to show legend for series and my code is like this

                    PointSeries valueSeries= new PointSeries();                   

                    valueSeries.PointTemplate = App.Current.Resources["PointTemplate" + SeriesCounter] as DataTemplate;       

                    valueSeries.ItemsSource = location.Parameter.Results;

                    valueSeries.CategoryBinding = new PropertyNameDataPointBinding("Time");

                    valueSeries.ValueBinding = new PropertyNameDataPointBinding("Val");                  

                    valueSeries.LegendSettings = new SeriesLegendSettings() { Title = "Value Series" };

                     chart.Series.Add(valueSeries);

but i am not getting the legend



please help me with code snipset to declare the actual legend and to bind its items to the chart.LegendItems collection:

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 20 Aug 2014, 08:53 AM
Hello Chinmaya,

I have already answered to the your question in this thread. I will ask that in the future you do not duplicate questions because this makes the communication process harder to follow and it takes us more time to answer your questions. Please chose only one of the threads to continue our communication if needed.

Regards,
Petar Marchev
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
ChartView
Asked by
Chinmaya
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or