LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

when writing new value to chart, don't change scroll position

Solved!
Go to solution

I have a program that writes a new value to a chart every minute.  (The x axis is time).  I show the last weeks worth of data on the chart,  but I also have the x-axis scroll bar visible so users can scroll back to view previous weeks.  The problem is that if they've scrolled back a few weeks and the one-minute chart update happens, the chart jumps to the current time (shows the latest week.)  Is there a way to have the chart simply stay put when even when a new value is written to it?

0 Kudos
Message 1 of 3
(2,381 Views)
Solution
Accepted by John_Speckhard

John,

 

I believe you can use the "Defer Panel Updates" property to accomplish this.  Set the property TRUE on a user mouse enter event for the chart to prevent the updating of the chart while the user moves the scroll.  Set it back to FALSE on a mouse leave.I tried the same with a mouse down/mouse up event but it didn't seem to behave as expected.  You canplay around with different events to see what works best but this basic technique should work.  Have a look at the attached screenshot for details.


Dan

 

Message 2 of 3
(2,367 Views)

Thats just what I needed!  Thanks so much

0 Kudos
Message 3 of 3
(2,352 Views)