06-07-2014 12:09 AM
Hi,
I use a graph with an XAxisDateTime and without data.
When I set a range < 5s, the graph crash :
"Une exception non gérée du type 'System.OutOfMemoryException' s'est produite dans mscorlib.dll"
Here is my code :
XAML :
<ni:Graph x:Name="MyGraph" HorizontalAlignment="Left" Height="275" Margin="10,35,0,0" VerticalAlignment="Top" Width="476"> <ni:Graph.Axes>
<ni:AxisDouble x:Name="verticalAxis1" Orientation="Vertical" Label="C" Location="Far"/> <ni:AxisDateTime x:Name="XAxis" Orientation="Horizontal"/> </ni:Graph.Axes>
</ni:Graph>
VB.NET :
Private Sub InitializeGraph() MyGraph.PreferIndexData = False XAxis.Range = Range.Create(DateTime.Now, DateTime.Now.AddSeconds(1)) End Sub
Thanks for any help.
O. Daniere.
06-09-2014 09:47 AM
Unfortunately, this a known issue with how we calculate divisions, which was discovered after the last Measurement Studio release. To avoid the crash, change the Mode
of the MajorDivisions
and MinorDivisions
of your axes. For example, the XAML below reduces the number of major divisions to three and hides the minor divisions:
<ni:AxisDateTime Orientation="Horizontal" MinorDivisions="{x:Null}">
<ni:AxisDateTime.MajorDivisions>
<ni:RangeLabeledDivisions Mode="Count: 3" />
</ni:AxisDateTime.MajorDivisions>
</ni:AxisDateTime>
08-11-2015 01:05 PM
Just wanted to let you know this issue (#452914) was fixed in the Measurement Studio 2015 release.