04-02-2013 09:34 PM
The pop-up menu on the Cursor Legend for graphs includes an item: Bring to Center which moves the active cursor to the center of the plot.
Is this capability available programmatically? An Invoke Node method or Property Node? I would like to have a button on the FP which "retrieves" a free cursor. I can see complicated ways using Cursor Position and Scale: Range property nodes. I could not find anything as simple as the pop-up menu.
Lynn
04-03-2013 03:00 AM
Lynn,
@johnsold wrote:
[...]I could not find anything as simple as the pop-up menu.
Neither do i. I recommend to create a suggestion out of this. It is really weird that those functions, which are obviously already encapsulated in the graph/cursor functionality, are not exposed to be called programmatically.
Norbert
04-03-2013 07:57 AM
Thanks, Norbert. I will wait a day or so to see if someone else has any hints. If not, I will post to the Idea Exchange.
Lynn
04-03-2013 08:06 AM
Lynn,
one note: i would expect this as invoke method rather than property. Makes more sense to me 😉
Norbert
04-03-2013 08:40 AM
I agree.
Lynn
04-06-2013 05:53 PM
04-06-2013 06:01 PM - edited 04-06-2013 06:03 PM
Hey guys,
actually, this is doable.
Look Here
If you need to snap it to some data, then set the property too.
It works OK, but I used it and I remember it failed to work for extreme zoom levels 🙂 (nothing happened)
Do not remember if the inbuilt functionality failed aswell.
Edit: It did 🙂
04-06-2013 07:22 PM
Thanks for the link. I knew it could be done that way but a direct Invoke node to match the pop up menu capability would still be nice.
Lynn
04-17-2013 10:00 AM
@Bublina wrote:
[..]It works OK, but I used it and I remember it failed to work for extreme zoom levels 🙂 (nothing happened)
Do not remember if the inbuilt functionality failed aswell.
Edit: It did 🙂
I take the Edit as "it fails as well". At least, it wouldn't surprise me if you meant it differently.
The reason:
Extreme zoom levels usually mean, that both endpoints of the scale do have a very small difference. Since the center is (at least in altenbach's code and i assume that the context menu function works similar) the average of both endpoint values, the difference between endpoint and average cannot be covered by the used numeric representation. So it computes an average, but that equals to one of the endpoints......
So this is rather a "works as expected" issue, even if not very nice and most likely considered a bug by the user (without above explanation).
Norbert
04-17-2013 12:23 PM
I think the "fail situation" caused the cursor jump to completely remote location.
I had a GPS data and I used the XY to display sort of a route, when the method (or setting the property) didnt work, it brought the cursor to a completely different location. There were still visible points on the XY graph. I solved it by implementing my own Zoom functionality to prevent user from zooming to levels where it didnt work. I did not investigate it any further.
I will try to reproduce this issue, once I get some free time.