Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

how to write text in the graph

I need to label the value of every point I chart. How can I put text in the CWgraph? I try to m_Graph.GetDC()->TextOut(...) but it did not work. Is there an easy way to do?
Thank you for replying this mail. NI support has always been great. You guys really helped me through all the problems I had
0 Kudos
Message 1 of 3
(3,042 Views)
The graph's annotations feature should help you do what you want. Take a look at the example under the VC\Examples\Ui\Graph\Annotations folder under the directory where you installed Measurement Studio.

- Elton
Message 2 of 3
(3,042 Views)
You can use annotations to introduce the functionality that you desire. The CNiAnnotation encapsulates the interface to a single annotation on a graph control, which allows you to modify the annotation?s appearance (such as the caption). To add a new annotation associated to your graph you can use
graph.Annotations.Add();
After adding an annotation to a graph you can change each of its data items such as caption, visibility, etc.
You can look at the example program that is included with Measurement Studio. It should be located on your Measurement Studio folder under VC\Examples\Ui\Graph\Annotations. In addition, you can check out the documentation for the CNiAnnotation object on the Measurement Studio Reference help file.
Best regards,

Diego F.
Appli
cations Engineer
National Instruments
www.ni.com/ask
Message 3 of 3
(3,042 Views)