So I am trying to work through the examples in the Infragistics.Samples.SL particularly the ChartCrossHair sample.
I pull the code to another solution and can't seem to get the cross hair to show. The code is pretty much
the same, just pulled out to a different solution. I'm sure I'm making a simple
error but can't seem to get the cross hair to show. I have included my xaml below. Can someone help ? Thanks
<UserControl x:Class="CrossHair.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400"
xmlns:ig="http://schemas.infragistics.com/xaml"
xmlns:models="clr-namespace:CrossHair.Models;assembly=CrossHair">
<UserControl.Resources>
<models:NumericDataModel x:Key="randomData1" d:IsDataSource="True" />
<models:NumericDataModel x:Key="randomData2" d:IsDataSource="True" />
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White">
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<ig:XamDataChart Name="xamDataChart1" Grid.Row="0"
CrosshairVisibility="Visible"
DataContext="{Binding Source={StaticResource randomData1}}" >
<!--#BEGIN SNIPPET#-->
<!-- ========================================================================== -->
<!-- Notice that this Crosshair behavior is implemented locally and you will need to copy it
if you want to show only vertical or horizontal crosshairs otherwise both crosshairs will be displayed -->
<!--#END SNIPPET#-->
<ig:XamDataChart.Axes>
<ig:CategoryXAxis x:Name="xAxis" ItemsSource="{Binding Data}">
<ig:CategoryXAxis.LabelSettings>
<ig:AxisLabelSettings Visibility="Collapsed" />
</ig:CategoryXAxis.LabelSettings>
</ig:CategoryXAxis>
<ig:NumericYAxis x:Name="yAxis" >
<ig:NumericYAxis.LabelSettings >
</ig:NumericYAxis.LabelSettings>
</ig:NumericYAxis>
</ig:XamDataChart.Axes>
<ig:XamDataChart.Series>
<ig:LineSeries ItemsSource="{Binding Data}"
Brush="Blue"
MarkerType="None"
XAxis="{Binding ElementName=xAxis}"
YAxis="{Binding ElementName=yAxis}"
ValueMemberPath="Y" />
</ig:XamDataChart.Series>
</ig:XamDataChart>
<ig:XamDataChart Name="xamDataChart2" Grid.Row="1"
DataContext="{Binding Source={StaticResource randomData2}}"
CrosshairVisibility="Visible" >
<ig:CategoryXAxis x:Name="xAxis2" ItemsSource="{Binding Data}">
<ig:NumericYAxis x:Name="yAxis2" >
Brush="Red"
XAxis="{Binding ElementName=xAxis2}"
YAxis="{Binding ElementName=yAxis2}"
</Grid>
</UserControl>
Hello Martin,
Thank you for your post. I have been looking into it, but since I cannot be completely sure how your data is organized I am not able to conclude what could cause your issue, so could you please send an isolated sample project, where the issue is reproduced, so I can investigate it further for you.
Looking forward for your reply.
Hi Stefan:
Thanks for the quick reply. The code that I am using is basically the same code that is in your samples solution. It is just pulled out into a separate project. Because of that I believe the reason for the cross hair not showing to be environmental but I can't quite figure out what the problem is. I've attached a sky drive link to a zip file containing a sample project.
Martin
https://skydrive.live.com/redir?resid=D490AB8E62919850!193&authkey=!AF9SW6rPGHjgq_U
I have been looking into your sample and i tested it with teh latest Service release of 12.1 and there the issue has already been fixed, so I can suggest you download it by logging to our web site and going to Account \Keys & Downloads.
Hope this helps you