07-19-2019 12:58 AM
Hello there,
Is there any way of plotting multiple graph like for example ( please refer the screenshot)
If i click on just the plot M1 I need to popup another bar graph
Please let me know any suggestions for this
Thanks in advance
07-19-2019 01:22 AM
Hi akshay,
you can detect mouse clicks using an event structure.
Then you need to deduct the sample index (M1-M5) from mouse position to open a new VI with your other graph…
(You might also use a graph cursor.)
Where are you stuck? What's the actual problem?
07-19-2019 02:39 AM
Hello,
I guess using the event for mouse click, It would take the whole graph.
But I just need only one plot (M1) to be selected.
Regards,
Akshay
07-19-2019 02:46 AM
@akshay321 wrote:
I guess using the event for mouse click, It would take the whole graph.
But I just need only one plot (M1) to be selected.
The mouse down (or up) event has coordinates. The graph has methods (invoke node) to convert these methods to plot coordinates. The cursor grab (or release) event returns plot coordinates. There's a method or property (IIRC) to get the sample index of a cursor that you could also use.
Once you have plot coordinates, you need to do a hit detection to see which sample was clicked, if any. That's a lot of work, but it's all basic math.
07-19-2019 04:05 AM
Hi,
Do you have any example for this for better understanding.
Regards,
Akshay
07-19-2019 04:11 AM