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

Annotations not shown on RadCartesianChart

1 Answer 76 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
xamlcat
Top achievements
Rank 1
xamlcat asked on 03 May 2013, 12:45 PM
Hi,

I do have a RadCartesianChart inside a DataTemplate which does not show its defined Annotations (VerticalAxis' x:name is set and referred from the Annotations) . The same RadCartesianChart worked fine outside the DataTemplate on a project test, showing all the Annotations. I don't know what is happening, I suppose it's something I missed but I can't see what it is.

Code:

<telerik:RadCartesianChart Grid.Column="1"
view:ChartSeriesProviderBehavior.Series="{Binding Path=VisibleSeries}"
>

<telerik:RadCartesianChart.HorizontalAxis>
<telerik:DateTimeContinuousAxis IsInverse="True" GapLength="0.14" LabelFitMode="Rotate" LabelRotationAngle="45" LabelFormat="dd MMM yyyy" Minimum="{Binding Path=Min}" Maximum="{Binding Path=Max}" />
</telerik:RadCartesianChart.HorizontalAxis>

<telerik:RadCartesianChart.VerticalAxis>
<telerik:LinearAxis x:Name="verticalAxis" />
</telerik:RadCartesianChart.VerticalAxis>

<telerik:RadCartesianChart.Annotations>
<telerik:CartesianGridLineAnnotation Axis="{Binding ElementName=verticalAxis}" Value="2" Stroke="Red" StrokeThickness="1"/>
<telerik:CartesianGridLineAnnotation Axis="{Binding ElementName=verticalAxis}" Value="13" Stroke="Red" StrokeThickness="1"/>
</telerik:RadCartesianChart.Annotations>

<telerik:RadCartesianChart.Behaviors>
<telerik:ChartPanAndZoomBehavior ZoomMode="Horizontal" PanMode="Horizontal" />
<telerik:ChartTooltipBehavior Placement="Top" VerticalOffset="0" />
</telerik:RadCartesianChart.Behaviors>

</telerik:RadCartesianChart>


Thanks for your help!

1 Answer, 1 is accepted

Sort by
0
xamlcat
Top achievements
Rank 1
answered on 06 May 2013, 08:24 AM
Solved. The RadCartesianChart axis were not set.
Tags
ChartView
Asked by
xamlcat
Top achievements
Rank 1
Answers by
xamlcat
Top achievements
Rank 1
Share this question
or