Adam -
There are a few things you can try to boost the performance of the graph.
1) Turn off the 3D frame. The 3D drawing impacts performance. Go to Properties>>Style and uncheck 3D Frame.
2) If you are using a ChartXY or ChartXvsY method, minimize the size of the chart history that each graph maintains. If you never need to scroll back through the data, you should reduce the chart history length to only what you want to display. If you are using ChartY, set the Chart history to automatic (Properties>>Graph>>Chart history).
3) If you are calling plot methods on the CNiPlot object rather than on the CNiGraph object, cache a reference to the CNiPlot object instead of repeatedly accessing it through the CNiGraph::Plots property. Accessing through the C
NiGraph::Plots property results a few calls into the control, which slows performance.
4) If possible, create each graph in the thread from which you will be accessing it. The issue here is that all calls into an ActiveX control must occur on the thread that creates it. The Measurement Studio C++ classes use the COM
Global Interface Table (GIT) to automatically work around this limitation for you. The effect, however, is that calls to the graph and its subobject from a thread other than the thread that created it result in the call being serialized as a windows message and posted to the thread that created the control. This means that if you create both graphs on the user interface thread, all calls to them will end up occurring on the user interface thread. If you do create the graphs on different threads, you can pass CNiInterface::SingleThread to the graph constructor to elimin
ate the overhead caused by the control using the GIT.
Let us know how these options work for you or if you need more information about dynamically creating a control in another thread.