LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using 2 lines timestamp to label a sampling point.

Hello,

I want to timestamp to label a sampling point in a graph , the timestamp label should have two lines : the first line displays time string , the second line displays date string . Does cvi has such a function ?


David
0 Kudos
Message 1 of 5
(3,460 Views)
On a graph yu can use PlotText to write some text in the plot area. PlotText accepts x- and y-position as parameters so you can place your text everywhere in the plot area.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 5
(3,453 Views)
Thanks , Roberto.

David
0 Kudos
Message 3 of 5
(3,443 Views)
Hi Roberto,


Sorry , I can not write the date string on the x-axis , the syntext is as :"PlotText (panelHandle, ctrlID, xCoor, tempRandNum[i], date, VAL_APP_META_FONT, VAL_BLACK, VAL_TRANSPARENT); i++; xCoor ++;" , because the text string are all wrote on the curve points . It seems that just to use the InsertAxisItem()to do this . Please advise me how to achieve the way as your hint ? By the way , if can write time string on the x-axis , how to write data string below the time string on the x-axis? Thanks.


David
0 Kudos
Message 4 of 5
(3,443 Views)
Hello David,

If you just want to change the label of the x axis to a string, then follow the procedure mentioned in this KnowledgeBase. The label on the bottom x axis cannot span multiple lines. Instead, you can label both the top and the bottom axis (one with the time strings and one with the data strings) and then display both.

Hope that helps.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 5 of 5
(3,421 Views)