LabVIEW Idea Exchange

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

Legend improvements galore

Status: New

You can spend a lot of time getting the functionality you want with LabVIEW Charts/Graphs...but if you ever need to do a quick job and have to rely on the in-built behaviour the list of limitations is formidable. I've just spent some time banging my head into some of the behaviours of the in-built chart legend; so excuse the rant and composite (and pictureless!) idea. I plead temporary insanity!Smiley Frustrated

 

Legends can either show the plot names in a vertical list (the traditional way), or horisontal. If you want the list to match the number of plots on the graph you might think that you get this done automatically if you have the "Autosize legend"-option checked, but no - that only autosizes the horisontal size of the plot name labels. 

 

1) So we need two autosize options; plot name is there already, number of plots shown is not.

 

(Yes, you have the number of rows property so you can set it programmatically yourself, but in 90% of the cases you are then just doing an autosize...and you would also want it to stop expanding outside the bounds of the graph. Not to mention that this property is a bug in itself).

 

Now, if you use the current autosize feature and the legend is on the right of the graph, a long plot name might cause the legend to grow until it covers parts of the graph. Not very practical. We need a way to specify that the legend should stop at the edge of the plot area; and optionally it should grow to the right instead when this occurs...

 

2) Stop the growth of the legend before it overlaps the plot area and/or make it an option to shrink the graph to allow the legend to grow.

3) If the plot name is longer than the space available to display it the user should still be able to see it if he puts the mouse above it on the legend; the full name could then be shown tip-strip style, or the text could scroll left to right in a loop...

 

Right click menus on legends are an all-or-nothing deal; either you allow the users access to it and they can mess things up completely; or you remove the option and build your own.But you cannot use right-clicks on the legend to trigger your own contextual menu as there is no such event to register, so:

 

4) Add a filter event for right-clicks on the legend.

 

Now, in reality we should really just drop the current legend and get a new one, one that can be placed as a table below or to the side of the graph; and allows us to add additional information about each plot by adding columns to this table..Throw in some events for the legend tabel so that we can customize the behaviour when a user e.g. right-clicks on it (for example to select another plot to trend from your own tag list). This would produce the type of legend most SCADA/DCS systems have for their trends...  (I've built this myself earlier, but it's a big job, and requires some hacks.)

 

5) Change the legend into a multicolumn-multi-data type customizable table/listbox suitable for placement above or underneath the graph with a matching resizable width for good looks - with the option to add additional columns, events to customize right-click responses etc. This is the ultimate idea as it will automatically solve a number of issues with the current design.

 

Now, have you ever used a classical chart or graph and shown the plot visibility checkboxes? They show up above the plot name, instead of next to it(!). You can customize the control to put the checkbox where it should be (i.e. the same place as for modern controls), but why is it needed in the first place.

 

6) Put the plot visibility checkbox next to the plot name on classical charts, instead of above and to the left.

 

I'll leave sub-ideas 7 to 50 for now...Smiley Wink

3 Comments
X.
Trusted Enthusiast
Trusted Enthusiast

1) yes. I would argue that we want another parameter: max number of rows (or columns), as it is otherwise difficult to keep track of the appropriate value. By default there would be no maximum, but once the user (programmatically or not) sets it to a value, it is available to read anywhere a reference to the Graph is passed/

 

2) obviously. I am particularly annoyed by the systematic screw up that happen when moving a VI from one machine to the next due to different default fonts. Autosizing is bad but I am not sure it can be fixed easily...

 

3)-4) I am not sure I follow you on this one. I find creating my own contextual menu rather simple.

 

5) good luck with that. I don't even feel like reading it...

 

6) I had to check this one as I did not even remember how the classic style looked liked. Ugh!

X.
Trusted Enthusiast
Trusted Enthusiast

7) I think I would love to have the possibility to have a different contextual menu for different regions of the graph (legend, scale, plot area, etc)

X.
Trusted Enthusiast
Trusted Enthusiast

I am linking a thread that got aborted quickly, but is another point for NI consideration.