LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
BertMcMahan

Decouple plot legend/tools/etc from the plot graphic itself

Status: New

Currently, for waveform/XY plots/graphs, the legend, graph palette, cursor window, etc are all "coupled" with the graph itself from a "graphical" perspective.

 

This means that all of these "addons" must be attached to the graph, and you can't put them in a different part of the panel. Screen resizing thus tends to screw things up, especially if your plot names can be defined by the user.

 

I'd like to decouple these somehow.

 

For example, I'd like to be able to put my legend and zoom tools in separate panes separated by splitter bars, or even in a right-click style menu (like a subpanel popping up). This feature would let you use automatic resizing on the plot itself and keep the legend separate.

 

BertMcMahan_0-1620838414574.png

 

You could theoretically program your own version of this, but:

-Recreating the legend functionality (line size/width/etc) would be a large undertaking, especially since there isn't a native Datagrid type control that could display a checkbox, string, and small image.

-I don't know of a way to get at the built-in zoom/pan tools programmatically (yes, you could create your own, but it's a big PITA)

-It wouldn't work at edit time, like the current features do, unless you baked all of it into an Xcontrol

 

Basically yes, you COULD get a lot of this done yourself... but it'd be nice to just use the tools NI already made, which work great. I don't want to reinvent the wheel just for some graphical convenience.

3 Comments
JimChretz
Active Participant

I kudo this but I believe LabVIEW graphs need a major re-spin that would go beyond the scope of the issues described here. 

BertMcMahan
Active Participant

The Advanced Plotting Toolkit can help with some of your plotting needs, but it only helps with generating the plots itself. This idea is more for the non-data side of the display indicator. The APT uses (IIRC) picture controls to draw the graphs. I'm not sure if there are cursor tools or not as I have only looked at it out of curiosity.

BertMcMahan
Active Participant

Well I learned something new today. Turns out you CAN access the built-in pan and zoom tools, but it's via the property node "Palette:ActiveTool". Setting that property sets the cursor to that type of tool.

 

https://zone.ni.com/reference/en-XX/help/371361R-01/lvprop/grphchrt_paletteactivetool/

 

I'd looked before at the Invoke nodes for some type of "Initiate zoom" method, but I didn't even think to look for this in the property nodes. I just happened to stumble across it today.

 

This would make it pretty simple to make a QControl with multiple parts. I don't know if XControls or YControls can have items split by panes or not, though they could probably have a button value reference tied into them somehow. (I haven't used those tools much before so I'm not as familiar as I am with QControls).