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>
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>