Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

CNiChart (ChartXY) only shows around 200 points

        CNiPlot plotEmissions;

        plotEmissions = m_Graph3.Plots.Item(2);        
        for (int n = *pd_fr; n <= n_temp; n++)
        {
            plotEmissions.ChartXY(n, d_PowerLvl[n]);
        }

Lets say the range is from 700 to 2200, what happens is as the loop advances newer data is displayed but the older data gets deleted from the graph. This happens after point count reaches around 200-250. I didn't find anything on the ActiveX property page or from the wrapper class that points to anything where I set a limit for number of points, so how do I prevent this from happening?
0 Kudos
Message 1 of 5
(6,744 Views)
Sami,

I tried to replicate this issue, but my plots kept all of the data points when I wrote them. Would it be possible to post a small example of this other than just this snippet. It's possible there is something else going on that is causing this, because what you have is correct (I substituted 0 for *pd_fr and created my own graph as well).

Brandon Vasquez | Software Engineer | Integration Services | National Instruments
0 Kudos
Message 2 of 5
(6,731 Views)
Here is a sample project (VS2005) that exhibits the behaviour. It's a simple loop that draws a line across the chart. Same thing happens, only part of the data is displayed.


0 Kudos
Message 3 of 5
(6,727 Views)
From the Measurement Studio help, I found this.


This function is similar to the PlotXY function, except that previously plotted data is not deleted until the amount stored for each chart is greater than the CNiGraph.ChartLength property.



In your project this property is 0, setting this to the desired amount will give you the results you are looking for. Also, the following link has a good explanation of this property.

http://forums.ni.com/ni/board/message?board.id=231&message.id=3028&requireLogin=False

Brandon Vasquez | Software Engineer | Integration Services | National Instruments
0 Kudos
Message 4 of 5
(6,713 Views)
That fixed it. I knew it was something simple, just couldn't find it. Thanks!
0 Kudos
Message 5 of 5
(6,708 Views)