12-13-2020 04:05 PM
Hello,
I have a xy graph (see image) which right now works pretty well (the user can change the values during run with the numeric control and the graph updates accordingly).
The problem I have right now is that I want the user to be able to slide the parameters (highlighted in the bottom-left corner of the image) INSIDE the graph, then the program should update the other point-values in the same way as if the change was made from the numeric controls. I tried using cursors to move specific points, but I didn't find a way for the program to understand which numeric control it is supposed to change and to then move the other points affected..
Solved! Go to Solution.
12-10-2020 05:14 PM
Hey,
Right now im sending parameters for a graph by sending data (wavelength, offset and others) manually through buttons and textfields. I was thinking that maybe I could present the user with an interactable graph/image, where the user drags the graph-line itself and the values are automatically moved accordingly. Does anyone know a way of doing this?
Thank you very much,
Elias
12-11-2020 01:44 AM
Hi Elias,
@EliasÅk wrote:
I was thinking that maybe I could present the user with an interactable graph/image, where the user drags the graph-line itself and the values are automatically moved accordingly. Does anyone know a way of doing this?
Use an event structure to handle all those events possible with a graph!
You can detect mouse/keyboard actions, scale changes, cursor movements, …
12-11-2020 03:29 PM
Hi Elias, my graph extensions toolkit for labview might be what you are looking for if you want ways to add overlays, lines, boes, etc to annotate your graph. You can easily access those annotations then too if you need to use them for other math functions or log them.
its free library, check it out here: https://github.com/unipsycho/Graph-Extensions-LabVIEW
Forum thread on it here; https://forums.ni.com/t5/Example-Code/Graph-Extensions-for-LabVIEW/ta-p/3537348
12-12-2020 06:03 PM
Thanks for the answer. I believe this is the way to go, however I don't really know how I put an even for the user clicking and draging on the graph?
The image attached is the graph I want to present to the user, and the variables are what I want the user to be able to fix - by interacting with the graph.
12-12-2020 06:05 PM
Hey, I like the library! However I dont think I can use it here for what I want to do? Maybe to extract the parameters, but first I want the user to click the graph and drag the curve itself to the values wanted (see the other answer I wrote for image I want to create).
12-14-2020 10:55 AM
Sure, I understand what you mean, my library is an example of how you can detect the events and use them to draw layers on the graph. You'll have to learn from it to make your own then if you need the specific example you showed. I've done user built graph profiles exactly like that before, you will have to learn how to handle the events, getting the position and use them to draw a curve that you show on the graph.
12-14-2020 06:05 PM
@EliasÅk wrote:
Hello,
I have a xy graph (see image) which right now works pretty well (the user can change the values during run with the numeric control and the graph updates accordingly).
The problem I have right now is that I want the user to be able to slide the parameters (highlighted in the bottom-left corner of the image) INSIDE the graph, then the program should update the other point-values in the same way as if the change was made from the numeric controls. I tried using cursors to move specific points, but I didn't find a way for the program to understand which numeric control it is supposed to change and to then move the other points affected..
I used the mac program pro Fit, www.quansoft.com, that has the feature you are looking for; it is a data analysis program. @Mike_King's library is an excellent starting point to implement this feature.
mcduff