LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically hide arrow of newly created graph annotation + more...

I am trying to use annotations to let the user build a ROI on a graph. Not having any events related to annotations does not help, but I can get around that using a Mouse Up event and sort through the different possibilities.

What I can't get around (apparently), is that when creating an annotation:

- the default is to have an arrow displayed next to it (even when the name is an empty string!)

- there appears to be no way to automatically name the newly created annotations (you would think that they would behave sinilarly to new cursors) with an incremented number (say "Vertex n", where n is incremented starting from 0).

 

Are these hidden features or features worth an idea suggestion?

LV 2011.

0 Kudos
Message 1 of 6
(3,098 Views)

Hi X,

 

I believe that it is possible to do what you are trying to do, unless I am misunderstanding your problem.

 

Two sections under the LabVIEW 2011 help go into quite a bit of detail as to features that are possible:

 

"Adding Annotations to Graphs"

"Customizing Graphs and Charts" (specifically "Using Graph Annotations")

 

Let me know what you think or what needs clarification.

 

Kind Regards,

 

Nathan B

Applications Engineer

National Instruments

Message 2 of 6
(3,075 Views)

Nathan,

thanks for reading, but that was not my question. You can indeed programmatically change anything you want to annotations, but if the user creates a new annotation:

1) you are not informed of it (there is no event associated with annotation modification) so you have to get around that by monitoring mouse actions in the graph and sift through the events to isolate those which affected an annotation.

2) the style of the annotation (arrow, name, etc) is not customizable BEFOREHAND. You have to detect the annotation creation (see above), then adjust its style. This is actually a comment that holds for cursors too.

 

In my particular case, I am using annotations to allow the user to draw regions of interest on a graph, so I am really interested in just having points on the graph. I then draw a path connecting those points to generate the ROI contour. I don't need arrows and I would need to have each new annotation labeled with a single number (1, 2, etc...).

Of course I could hide the "Create Annotation" runtime menu and create my own to handle all this, but I think it would be nice to have this available by default...

My 2 cts,

X.

0 Kudos
Message 3 of 6
(3,065 Views)

I prefer cursors for this particular operation, but this might get you started.

 

http://forums.ni.com/t5/LabVIEW/How-to-select-a-set-of-points-in-a-xy-graph-contained-in-an-area/m-p...

Message 4 of 6
(3,059 Views)

I am using cursors to define hard min and max bounds, so that would not work for me... Bruce Ammons trick works fine too BTW.

0 Kudos
Message 5 of 6
(3,057 Views)

Just as an update for future readers: I am now using the "PlotImages.Front" Property of the XYGraph to display my ROIs.Much easier...

0 Kudos
Message 6 of 6
(3,005 Views)