Hi,
Is there any possibility of Binding a collection of objects to XamDataChart series (LineSeries in general and ScatterSeries to be specific), which draws all series on chart and we don't have to define individual series separately? I actually can have undefined number of series and I don't want to generate series from Code side.
What are different possibilities in this scenario? Any help?
Hello Asim,
Thank you for your post. I have been looking into it and I can suggest you see this link from stackoverflow:
http://stackoverflow.com/questions/18857830/xamdatachart-with-unknown-number-of-series
where there is a sample showing how to bind the XamDataChart’s Series Property. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
If its part of DataTemple how to handle?
I have TileManager having ItemeTemplate InfragisticChart which has variable ScatterSeries.I have used the code.I get error
SeriesType type = (SeriesType)seriesSource.GetType().GetProperty(TypePath).GetValue(seriesSource, null);
TypePath null exception.
<ig:XamTileManager TileCloseAction="RemoveItem" Grid.Row="0" Name="XamTileManager1" Margin="10,0,0,0" HeaderPath="Name" ItemsSource="{Binding Spectrums}" >
<ig:XamTileManager.NormalModeSettings> <ig:NormalModeSettings AllowTileDragging="Swap" AllowTileSizing="Individual" HorizontalTileAreaAlignment="Stretch" ShowAllTiles="True" TileLayoutOrder="UseExplicitRowColumnOnTile" VerticalTileAreaAlignment="Stretch" /> </ig:XamTileManager.NormalModeSettings> <ig:XamTileManager.MaximizedModeSettings>
<ig:MaximizedModeSettings AllowTileDragging="Slide" HorizontalTileAreaAlignment="Stretch" MaximizedTileLocation="Left" MinimizedTileExpandButtonVisibility="Visible" MinimizedTileExpansionMode="AllowOne" ShowAllMinimizedTiles="True" ShowTileAreaSplitter="True" VerticalTileAreaAlignment="Stretch" > </ig:MaximizedModeSettings> </ig:XamTileManager.MaximizedModeSettings>
<!--Start of the normal item template--> <ig:XamTileManager.ItemTemplate> <DataTemplate> <ig:XamDataChart x:Name="MainPlot" Background="White" PlotAreaMargin="5" DefaultAxisStroke="Black" DefaultInteraction="DragZoom" FontWeight="Normal" Foreground="Black" HorizontalZoomable="True" TitleHorizontalAlignment="Center" VerticalZoomable="True"> <local:SeriesBinderBehavior.SeriesBinder> <local:SeriesBinderInfo ItemsSourcePath="Source" XMemberPath="XPath" YMemberPath="YPath" TypePath="Type" SeriesSource="{Binding SeriesSource}"/> </local:SeriesBinderBehavior.SeriesBinder> </ig:XamDataChart> </DataTemplate> </ig:XamTileManager.ItemTemplate> <!--End of the maximized template--> </ig:XamTileManager>