07-23-2013 06:58 AM
Hello all,
I need a vertical scrollbar (not for the legend but for the plot itself) for a XY-graph and I was amazed that it doesn't exist even if horizontal scrollbar are built-in.
So i'm currently trying to emulate the built-in horizontal scrollbar of a XY-graph using the scrollbar control (numeric palette). I'm really not sure if it's possible since I'm not even able the change the size of the part of the scrollbat that moves. It doesn't seem to have any property node to do that... Am I missing something? Did anybody ever try to do something like that?
Why horizontal scrollbar but no vertical?
I'm using LabVIEW 2012...
Any idea?
Thanks in advance!
Vincent
07-23-2013 07:54 AM
I've never needed a veritical scrollbar for a graph but it does seem like something that could be built in.
First make sure for the graph that Auto Scale for Y is turned off.
Regarding the scroll bar you can set the Minimum, Maximum, Increment, and Page Size properties with a property node, or in the properties of the control. For this you'll also want to make sure to Coerce values outside this range. This property only need to be set once, or can be set in the properties of the control.
Then with value change on the scrollbar you can set the range of the Y graph using property nodes. It isn't too difficult but the interaction will need to be defined, and initialized when new data is written to the graph.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
07-23-2013 07:58 AM
I think it's possible:
07-23-2013 08:04 AM
hi vgravel,
do you mean something like this?
change the size of the part of the scrollbat that moves:
rightclick on y-scrollbar > properties
Regards,
Alex
07-23-2013 08:18 AM
Okay I think I have a more complete solution. This VI will generate some data and graph it. Then you can zoom in and out with the normal graph palette controls. The difference is that as the graph is regenerated with data, or the scales change, the vertical scrollbar will change. I also messed with panes so that the scrollbar will be the size of the graph if the window is resized so it looks more like it is part of the control.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
07-23-2013 08:56 AM
Thanks everyone!
Hooovahh solution seems to do most of it.
I'll incorporate this to my application and see if it does the job.
Thanks again!
Vincent