LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting Multiple Bar graphs

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

0 Kudos
Message 1 of 6
(2,478 Views)

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(2,446 Views)

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

0 Kudos
Message 3 of 6
(2,404 Views)

@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.

 

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

Hi,

Do you have any example for this for better understanding.

 

Regards,

Akshay

0 Kudos
Message 5 of 6
(2,380 Views)

Hi akshay,

 

open the example finder and look for those example VIs on graphs and charts.

There is an example on "Graph cursors" and one for "Graph events"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(2,373 Views)