LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vertical scrollbar for graph (?!)

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

0 Kudos
Message 1 of 6
(4,135 Views)

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.

0 Kudos
Message 2 of 6
(4,123 Views)

I think it's possible:

GraphVscrollbar.png

0 Kudos
Message 3 of 6
(4,121 Views)

hi vgravel,

 

do you mean something like this?

2013-07-23_y-scroll.PNG

 

 

 

 

change the size of the part of the scrollbat that moves:

 

rightclick on y-scrollbar > properties

 

2013-07-23_y-scroll2.PNG

 

 

 

 

 

Regards,
Alex

Message 4 of 6
(4,113 Views)

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.

0 Kudos
Message 5 of 6
(4,106 Views)

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

0 Kudos
Message 6 of 6
(4,094 Views)