autoscaling is having difficulty near 0. See image below. Is there a way to fix this?
Another Example:
We were able to fix this by using StringFormat to stop at 3 decimals (StringFormat=0.###). I do think this looks like a bug in the autoscaling logic to get to this situation. Might be worth a look.
Hello,
To help me reproduce this issue, please provide a set of data that would demonstrate the problem with autoscaling.
Thanks,
Yes, after installing the service pack I removed our formatting, and the axis looked good for my quick testing example.
Thanks for the help.
Thanks for supplying the sample code. I tested this and noticed a change in the behavior with the latest Service Release (11.1.20111.2113).
With the v11.1 RTM version, the midpoint along the Y-axis is labeled as: -0.00999999999999995.
With Service Release 11.1.20111.2113, the midpoint along the Y-axis is labeled as: -0.01.
Please test this out and let me know if it resolves the issue satisfactorily.
I noticed something interesting. We used binding on the XAxis and YAxis to control the plot range. Default is NaN. I noticed that when those values are not set to NaN this does not happen. Perhaps its wrong to assume NaN mean to AutoScale. Remove the MinimumValue and MaximumValue settings to see the difference. I used NaN, but our actual project uses binding that has NaN as default.
WINDOW
<igDP:XamDataChart > <igDP:XamDataChart.Axes> <igDP:NumericXAxis x:Name="xAxis" MinorStroke="#11000000" MinorStrokeThickness="1" MinimumValue="NaN" MaximumValue="NaN"> </igDP:NumericXAxis> <igDP:NumericYAxis x:Name="yAxis" MinorStroke="#22000000" MinorStrokeThickness="1" MinimumValue="NaN" MaximumValue="NaN"> </igDP:NumericYAxis> </igDP:XamDataChart.Axes> <igDP:XamDataChart.Series> <igDP:ScatterLineSeries x:Name="Series1" XAxis="{Binding ElementName=xAxis}" YAxis="{Binding ElementName=yAxis}" Visibility="{Binding ElementName=ChartControl, Path=PointMarkerVisibility}" XMemberPath="X" YMemberPath="Y" Canvas.ZIndex="1000" > </igDP:ScatterLineSeries> </igDP:XamDataChart.Series> </igDP:XamDataChart>
Code Behind
Imports System.Collections.ObjectModelClass MainWindow Public Property Points As New ObservableCollection(Of Point) Public Sub New() ' This call is required by the designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. DataContext = Me Dim Data() As Double = {-0.307, -0.123, 0.04, 0.346, -0.247, -0.115, 0.012, 0.309} For i As Integer = 0 To 7 Points.Add(New Point(i, Data(i))) Next Series1.ItemsSource = Points End Sub End Class