I have the following xamdatachart that works correctly. I need to show the same chart inside the xamzoombar. HOwever when i place it inside <XamZoombar.HorizontalPreviewContent> no data is showing up on the xamdatachart that is my preview chart in my xamzoombar
<ig:XamDataChart MouseLeftButtonDown="Chart_MouseLeftButtonDown" MouseRightButtonDown="Chart_OnMouseRightButtonDown" PreviewMouseWheel="OnPreviewMouseWheel" DefaultInteraction="None" Grid.Row="1" Height="85" HorizontalAlignment="Stretch" Name="FlowChart" HorizontalZoomable="True" VerticalZoomable="False" VerticalZoombarVisibility="Collapsed" HorizontalZoombarVisibility="Collapsed" Margin="5,0,0,0"> <ig:SyncManager.SyncSettings> <ig:SyncSettings SyncChannel="syncGroup1" SynchronizeHorizontally="True" SynchronizeVertically="False" /> </ig:SyncManager.SyncSettings> <ig:XamDataChart.Axes > <ig:CategoryXAxis x:Name="XAxis" ItemsSource="{Binding}" > </ig:CategoryXAxis> <ig:NumericYAxis x:Name="YAxis" MaximumValue="-60" Interval="60" MinimumValue="60"> <ig:NumericYAxis.LabelSettings> <ig:AxisLabelSettings Location="OutsideLeft" Extent="30" /> </ig:NumericYAxis.LabelSettings> </ig:NumericYAxis> </ig:XamDataChart.Axes> <ig:XamDataChart.Series> <ig:LineSeries ValueMemberPath="Flow" ItemsSource="{Binding}" XAxis="{Binding ElementName=XAxis}" YAxis="{Binding ElementName=YAxis}" MarkerType="None" Resolution="1.5" UnknownValuePlotting="DontPlot"> <ig:LineSeries.ToolTip> <StackPanel Orientation="Vertical"> <TextBlock Text="{Binding Path=Flow, Source={x:Static Internationalization:CultureResources.CultureStrings}}" FontWeight="Bold" /> <StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Item.Flow}" /> </StackPanel> </StackPanel> </ig:LineSeries.ToolTip> </ig:LineSeries> </ig:XamDataChart.Series> </ig:XamDataChart>
i have put together a sample. I have the same chart shown twice just to show that just changing variables in the xaml is enough to display it twice. Makes sense that i should be able to drop the same chart into the horizontalpreview and have it display in the xamzoombar. This however is not the case. Any help would be appreciated.
Hello Pete,
Thank you for your post. I have been looking into the sample application that you have described and the reason for the chart to not appear is that the XamDataChart has bottom margin set to a value greater than the height of the XamZoombar and this forces the XamDataChart to go outside of the bounds of the visible area of the XamZoombar. Also, the XAxis and YAxis properties are bound to the axes of the root chart, which might cause some issues. After removing the margin and changing the axes bindings, the XamDataChart in the preview are of the XamZoombar seems to be appearing as expected.
Also, since the two XamDataChart are displaying the same data, you can set the DataContext of the parent of the XamZoombar and the root chart, to the SimpleDataCollection and both charts will display the same content.
I have modified the sample application that you have attached to implement the above modifications.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir, MCPD
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
this does not appear to solve my problem i will attach code and a screen shot of my app. no matter what i do i can not get the line series to show in the xamdatachart in the xamzoombar. the screen shot i have enclosed shows the same chart one inside and one outside the zoombar.
Thank you for your reply. I have been looking into the xaml file that you have attached and I have created a sample application based on it. I have create a Data class that contains a property for each of the different ValueMemberPaths in the xaml and set the DataContext of the Window to a collection of the Data class and all the charts displayed the data.
In the attached xaml, there were a lot of event handlers, so I assume that the reason for the XamDataChart in the preview area to not display any data, might be some of the events to clear the DataContext of that specific chart. I can suggest double checking, whether the XamDataChart in the XamZoombar has DataContext set and whether the ItemsSource of the series has value.
Also, you can modify the sample application that I have attached to use the event that you are using and to show the issue, in order to be able to research what might be causing the series to not display its data.
Looking forward to hearing from you.
I am just checking if you require any further assistance on the matter.