Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to using ni:Graph Control draw more than 500000 points

this is my test code:

ChartCollection<DateTime, double> chartCollection  = new ChartCollection<DateTime, double>();

chartCollection.Append(dateTimeList, doubleList);     //dateTimeList and doubleList has 500000 points
 graph.DataSource = chartCollection ;

but a System.OutOfMemoryException  throwed in mscorlib.dll when I  zoom the graph.

0 Kudos
Message 1 of 3
(5,379 Views)

Based on the data types involved, I believe you are hitting the same issue as the question WPF graph AxisDateTime crash. 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>

~ Paul H
0 Kudos
Message 2 of 3
(5,362 Views)

Just wanted to let you know this issue (#452914) was fixed in the Measurement Studio 2015 release.

~ Paul H
0 Kudos
Message 3 of 3
(4,283 Views)