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

Trend Line and Name in silverlight line chart

1 Answer 45 Views
Chart
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
Hi,

      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}"  >
                                    <telerikChart:RadChart.SeriesMappings>
                                        <telerik:SeriesMapping LegendLabel="Empty Cart Buffer">
                                            <telerik:SeriesMapping.SeriesDefinition>
                                                <telerik:SplineAreaSeriesDefinition>
                                                    <telerik:SplineAreaSeriesDefinition.InteractivitySettings>
                                                        <telerik:InteractivitySettings HoverScope="Series" SelectionScope="Series" />
                                                    </telerik:SplineAreaSeriesDefinition.InteractivitySettings>
                                                </telerik:SplineAreaSeriesDefinition>
                                            </telerik:SeriesMapping.SeriesDefinition>
                                            <telerik:ItemMapping FieldName="TimeKey" DataPointMember="XValue" />
                                            <telerik:ItemMapping FieldName="ContentCount" DataPointMember="YValue" />
                                        </telerik:SeriesMapping>
                                    </telerikChart:RadChart.SeriesMappings>
                                    <telerikChart:RadChart.DefaultView>
                                        <telerik:ChartDefaultView>
                                            <telerik:ChartDefaultView.ChartArea>
                                                <telerik:ChartArea LegendName="Throughput"
                                               NoDataString="Waiting for data..."
                                               EnableAnimations="False">
                                                    <telerik:ChartArea.AxisX>
                                                        <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:ChartArea.AxisX>
                                                    <telerik:ChartArea.AxisY>
                                                        <telerik:AxisY  Title="Throughput" />
                                                    </telerik:ChartArea.AxisY>
                                                </telerik:ChartArea>
                                            </telerik:ChartDefaultView.ChartArea>
                                            <telerik:ChartDefaultView.ChartLegend>
                                                <telerik:ChartLegend x:Name="ChartLegend1" />
                                            </telerik:ChartDefaultView.ChartLegend>
                                            <telerik:ChartDefaultView.ChartTitle>
                                                <telerik:ChartTitle Content="Throughput" />
                                            </telerik:ChartDefaultView.ChartTitle>
                                        </telerik:ChartDefaultView>
                                    </telerikChart:RadChart.DefaultView>
                                </telerikChart:RadChart>

1 Answer, 1 is accepted

Sort by
0
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:
http://www.telerik.com/community/forums/silverlight/chart/is-it-possible-to-annotate-customgridlines.aspx
I hope these direction will help you to achieve the desired effect. If further questions arise, do let us know.


Greetings,
Polina
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
Tags
Chart
Asked by
Murali Karlapudi
Top achievements
Rank 2
Answers by
Missing User
Share this question
or