Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting X, Y data from Graph?

Hi!

How can I access the X and Y data of CNiGraph? What is the difference between CCWGraph and CNiGraph? I want to be able to use multiple axises, multiple traces. I need the data, since I want to process it later. Please help.

Thanks,
Miklos
0 Kudos
Message 1 of 3
(3,729 Views)
CCWGraph is an ActiveX control and CNiGraph is a native C++ MFC interface to CCWGraph. CNiGraph uses CCWGraph for it's implementation, so their functionality is exactly the same. CNiGraph is much nicer to use in C++ because the interface is a native C++ interface that uses native C++ data types that are much nicer to use from C++, rather than the automation interfaces that are automatically generated by Visual C++. CCWGraph is what you would use in any other ActiveX environment, such as Visual Basic.

CNiGraph/CNiPlot does not provide a way to access the X and Y data of the plots. If you need access to the data, you will need to store that separately yourself before you plot the data in the graph.

If you are considering using .NET in the future, the
Measurement Studio .NET graphs do support getting access to the X and Y data via GetXData and GetYData methods on the plot.

- Elton
Message 2 of 3
(3,730 Views)
Thanks, I will have to store them then. I would need it for autoscaling as well, since I have 3 traces, 2 of them have 100pts, one has only 30, when I set the visible to false of the two larger traces the graph still is scaled to the larger traces, when i call AutoScaleNow it doesn't take into consideration that the two large traces are already hidden and it should rescale so the smaller one is visible.
0 Kudos
Message 3 of 3
(3,729 Views)