Hi,
I am using a xamDataChart and a SplineSeries. But unfortunately I am not able to bind my data with that.Could you please see whether it will work with code which I have written?
Thanks
<Style TargetType="{x:Type ig:SplineSeries}" BasedOn="{StaticResource {x:Type ig:SplineSeries}}"><Setter Property="ItemsSource" Value="{Binding Items}"/><Setter Property="ValueMemberPath" Value="SCurveValue" /><Setter Property="XAxis" Value="{Binding ElementName=XAxis}"/><Setter Property="YAxis" Value="{Binding ElementName=YAxis}"/></Style>
<ig:NumericYAxis x:Name="YAxis" MinimumValue="21" MaximumValue="29" ></ig:NumericYAxis>
<Style x:Name="XAxis" TargetType="{x:Type ig:CategoryXAxis}" BasedOn="{StaticResource {x:Type ig:CategoryXAxis}}"><Setter Property="ItemsSource" Value="{Binding Path=AllSeries[0].Items, Mode=OneWay}" /><Setter Property="Label" Value="{}" /></Style>
Thank you for posting in our forums.
When setting up SplineSeries for a Resources, you should add the same XAxis and YAxis to the XamDataChard.Axis property.
------------------------------------------------------------------------------<Style TargetType="{x:Type ig:XamDataChart}"> <Style.Resources> <ig:CategoryXAxis x:Key="XAxis" ItemsSource="{Binding Items}" Label="{}{Year}" /> <ig:NumericYAxis x:Key="YAxis" />
<Style TargetType="{x:Type ig:SplineSeries}"> <Setter Property="ItemsSource" Value="{Binding Items}"/> <Setter Property="ValueMemberPath" Value="SCurveValue" /> <Setter Property="XAxis" Value="{StaticResource XAxis}"/> <Setter Property="YAxis" Value="{StaticResource YAxis}"/> </Style> </Style.Resources>
<Setter Property="local:AxesService.XAxis" Value="{StaticResource XAxis}" /> <Setter Property="local:AxesService.YAxis" Value="{StaticResource YAxis}" /></Style>
<ig:XamDataChart x:Name="xamDataChart" > <ig:XamDataChart.Series> <ig:SplineSeries x:Name="splineSeries" ></ig:SplineSeries> </ig:XamDataChart.Series> <ig:XamDataChart.Axes> </ig:XamDataChart.Axes></ig:XamDataChart>------------------------------------------------------------------------------
I created a sample app.Please check an attached file.
6747.Sample.zip
Hi Akhil,
I am currently working on this and will update once I have more information.