Hi
I am using the XamDataChart to add a series of markers on top of a custom axis control. When upgrading from version 14.2 to version 15.2, the rendering of my markers stopped working correctly. Attached is a zip-file with two images showing the axis/markers when running 14.2 and 15.2 respectively. The markers (a ScatterSeries) is the blue triangles and the light gray background shows the extent of the XamDataChart control.
The Capture14_2.png image shows the correct behavior when running version 14.2. With respect to the axis valus, the markers should be positioned at the following values: 75, 252, 478, 521, 574 and 653. We see that the markers are positioned correctly in this image.
The Capture15_2.png image shows the incorrect behavior when running version 15.2. The markers are rendered at the wrong horizontal position. It looks like the error is biggest at the left and then decreases towards right. The vertical positions of the markers are also changed/wrong.
For reference, the associated XAML is:
<ig:XamDataChart Background="LightGray" Opacity="0.5" Visibility="{Binding DisplayMarkers, Converter={StaticResource BoolToVisibilityConverterCollapsed}}" Height="64" Margin="-4,0,-4,0"> <ig:XamDataChart.Series> <ig:ScatterSeries ItemsSource="{Binding RegionExplorerViewModel.Markers.ViewportMarkerSeries, Mode=OneWay}" YAxis="{Binding ElementName=yAxis}" XAxis="{Binding ElementName=xAxis}" XMemberPath="Location.X" YMemberPath="Location.Y" MarkerBrush="Blue" MarkerType="Triangle"> </ig:ScatterSeries> </ig:XamDataChart.Series> <ig:XamDataChart.Axes> <ig:NumericXAxis x:Name="xAxis" Visibility="Collapsed" MinimumValue="{Binding RegionExplorerViewModel.Markers.ViewportMinimum}" MaximumValue="{Binding RegionExplorerViewModel.Markers.ViewportMaximum}"> <ig:NumericXAxis.LabelPanelStyle> <Style> <Setter Property="Control.Height" Value="0" /> </Style> </ig:NumericXAxis.LabelPanelStyle> </ig:NumericXAxis> <ig:NumericYAxis x:Name="yAxis" Visibility="Collapsed" MinimumValue="0" MaximumValue="1"> <ig:NumericYAxis.LabelPanelStyle> <Style> <Setter Property="Control.Width" Value="0" /> </Style> </ig:NumericYAxis.LabelPanelStyle> </ig:NumericYAxis> </ig:XamDataChart.Axes></ig:XamDataChart>
As mentioned, the only difference in the executable code that generated the two images is the new Infragistics DLLs for version 15.2. Is there a known change from 14.2 to 15.2 (or 15.x in general) that may explain this behavior, or is this rendering change related to something else?
Regards,Leif
Hi Leif,
In your 14.2 screenshot (the desired behavior) it looks like you are rendering the ScatterSeries triangles outside of the chart's plot area. Is that the case? If so, how did you do this because from my understanding of the chart, the plot area is the only area that Series can render in. Ideally I want to be able to reproduce the issue you are seeing but I'm not sure how you positioned the ScatterSeries like that. Nothing in your XAML jumps out at me.
I do not think that the series are rendered outside of the plot area. The attached zip-file contains an image, Capture15_2_Edit.png, that highlights the graph's area with a red rectangle. This is the same area as the area with the gray background in the original images. In any case I have not done anything special to control the rendering apart from the straightforward XAML in the original post.
I do use the XamDataChart in two other places in my application. The basic XAML is similar to the XAML in the original post, and the rendering artifacts are also similar. The attached zip file also contains two images showing the artifact in one of these two other places. The Capture_Trace_14_2.png file show a XamDataChart used to display two graphs (red and green) at the right side of the image. The XamDataChart is rendered with a gray background to highlight the plot area. With version 15.2, as shown in the Capture_Trace_15_2.png file, the graphs are rendered out of position and at a wrong scale, similar to the effect in the images in the original post.
As mentioned, these artifacts are created by doing nothing else to the code but upgrading the Infragistics assemblies to version 15.2. The only 'non-default' part I can think of in my XAML is that I try to get rid of the XamDataChart axis in the axis style.
Thanks for clarifying. Initially I thought the grey area at the bottom of the screenshot was your chart since you had labels rendering at the top over where you said the XamDataChart actually was. Also on my monitor the chart background looks more white than grey so that was misleading for me as well. I was able to reproduce the issue now. In 14.2 the points render towards the bottom like in your screenshot but just switching to 15.2 causes them to shift up drastically as well as shift to the right for some reason. Not sure what that is about.
I'm investigating this so I'll get back to you shortly.
Thanks for your patience. So obviously we did something between 14.2 and 15.2 to cause this change in behavior but right now I don't know what that is. I need to dig into the source code to see if I can determine this but with regards to solving the issue for you finding this reason isn't really necessary. The reason being, the way your XAML is currently collapsing the X and Y axis panel is not the intended approach.
Setting the Visibility on the X and Y axis does not remove the space allocated for the axis panel which is why I think you tried to set the LabelPanelStyle. Thinking about it I guess this should technically work but it's not the way we recommend doing this. Each axis has a LabelSettings property and in these settings there is a Visibility property. Set this to Collapsed instead. No need to set the axis Visibility or the LabelPanelStyle. That should take care of the issue for you.
One thing to note is that if you switch over to the LabelSettings and stop using the axis Visibility, the axis grid lines are going to show. So you will probably want to keep using the axis Visibility set to Collapsed to keep those hidden.
Using LabelSettings instead of using LabelPanelStyle fixed the issue in all three cases! Thanks!