Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

CNiGraph.ChartXY(double x, double y)

ChartXY function is not working at my program.
The data for x axis and y axis is acquired from the serial port data processing.
These data is changed per 1 second.
Graph control is connected to member variable m_graph through Wizard.

Is there anything to have to do, for example initialization or someting?
0 Kudos
Message 1 of 2
(3,261 Views)
dustmoon,

I apologize that you haven't gotten an answer to this question yet. It certainly sounds like you are doing everything correctly. The key is that you need to create the member variable for the particular control. Are you calling ChartXY in a callback function of some type? Is there any way that the event is not being called? If you would like to test to make sure that everything is working correctly with your install, try opening the example located at "C:\Program Files\National Instruments\MeasurementStudio\VC\Examples\Ui\Graph\Plots Vs Charts\Plots Vs Charts.dsw", and alter line 180 of "Plots Vs ChartsDlg.cpp" to be:
m_graph.GetPlots().Item("Plot-2").ChartXY(i,((double)rand()/(double)RAND_MAX)*6);

This will run ChartXY on a CNIGraph and ensure that everything is working. If this works for you, yet your program continues to not, then perhaps post a code snippet so that I can take a look at what might be causing the incorrect behavior that you are seeing. I look forward to hearing from you. Thanks and have a good one.

Adam B.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,203 Views)