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

Trend Line and Name in silverlight line chart

1 Answer 55 Views
This is a migrated thread and some comments may be shown as answers.
Murali Karlapudi
Top achievements
Rank 2
Murali Karlapudi asked on 05 Apr 2011, 03:54 PM

      How to assign a name to a customgrid line and make it to appear on the chart ?
      I am having a custom grid line  like this

         C# code:
           //CustomGridLine DesignCapacityTrendLine = new CustomGridLine();
            CustomGridLine AvailableCapacityTrendLine = new CustomGridLine();
            AvailableCapacityTrendLine.YAxisName = "Available Capacity";
            AvailableCapacityTrendLine.YIntercept = 250;
            AvailableCapacityTrendLine.Stroke = new SolidColorBrush(Colors.Yellow);
            AvailableCapacityTrendLine.StrokeThickness = 2;

     Now I want to set a name for this trend line like "Available Capacity" and make it visible on the chart.

XAML code :

         <telerikChart:RadChart x:Name="RadChart15" ItemsSource="{Binding Data}"  >
                                        <telerik:SeriesMapping LegendLabel="Empty Cart Buffer">
                                                        <telerik:InteractivitySettings HoverScope="Series" SelectionScope="Series" />
                                            <telerik:ItemMapping FieldName="TimeKey" DataPointMember="XValue" />
                                            <telerik:ItemMapping FieldName="ContentCount" DataPointMember="YValue" />
                                                <telerik:ChartArea LegendName="Throughput"
                                               NoDataString="Waiting for data..."
                                                        <telerik:AxisX DefaultLabelFormat="#VAL{hh:mm:ss}" LabelRotationAngle="270" LabelStep="2"
                                                   LayoutMode="Normal" Title="Time" AutoRange="False"
                                                   MinValue="{Binding AxisXMinValue}"
                                                   MaxValue="{Binding AxisXMaxValue}"
                                                   Step="{Binding AxisXStep}" />
                                                        <telerik:AxisY  Title="Throughput" />
                                                <telerik:ChartLegend x:Name="ChartLegend1" />
                                                <telerik:ChartTitle Content="Throughput" />

1 Answer, 1 is accepted

Sort by
Missing User
answered on 08 Apr 2011, 05:03 PM
Hello Murali Karlapudi,

Please, review the following forum post, where this question is already answered:
I hope these direction will help you to achieve the desired effect. If further questions arise, do let us know.

the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Murali Karlapudi
Top achievements
Rank 2
Answers by
Missing User
Share this question