cancel
Showing results for 
Search instead for 
Did you mean: 

Toggle between waveform charts

AJcpt
Member

Toggle between waveform charts

I have 3 waveform charts showing different data but I'm trying to create a front end where I can toggle between the 3 graphs so I can see one graph at a time. I would preferable like to use a button that can toggle between the charts. Is there any way to do this or have an example of anything that does this?

12 REPLIES 12
crossrulz
Knight of NI

Re: Toggle between waveform charts

The simplest solution would be to use a Tab Control, with each graph being in its own tab page.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
AJcpt
Member

Re: Toggle between waveform charts

What if I wanted the displays to be on one tab but toggle through them?

altenbach
Knight of NI

Re: Toggle between waveform charts

Use exactly one chart with three traces and expose the visibility checkbox in the legend.

 

(Or tie visibility to a radio button control if only exactly one trace should show)

altenbach
Knight of NI

Re: Toggle between waveform charts

Message contains an image Message contains an attachment

@altenbach wrote:

(Or tie visibility to a radio button control if only exactly one trace should show)


 

 

Here's how that could look like:

 

altenbach_0-1708202054802.png

 

altenbach_0-1708202167901.png

 

AJcpt
Member

Re: Toggle between waveform charts

I have a new requirement where the waveform chart has to display 2 graphs at the same time. So total 6 graphs 2 on each chart.

 

Is there anyway I can change the above VI to implement the new requirement?

GerdW
Knight of NI

Re: Toggle between waveform charts

Hi AJ,

 


@AJcpt wrote:

I have a new requirement where the waveform chart has to display 2 graphs at the same time. So total 6 graphs 2 on each chart.

 

Is there anyway I can change the above VI to implement the new requirement?


So before you had 3 PLOTS and you wanted to show one of them.

Your "new" requirement is to manage 6 plots and make two of them visible.

 

In which way is this a "new" requirement? It's basically the very same requirement…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
AJcpt
Member

Re: Toggle between waveform charts

I'm just not sure how to change the VI above to only show 2 at a time. I have tried build array and other methods but nothing seems to work.

 

Any suggestions?

GerdW
Knight of NI

Re: Toggle between waveform charts

Hi AJ,

 


@AJcpt wrote:

I'm just not sure how to change the VI above to only show 2 at a time.

Any suggestions?


Altenbach's VI uses a FOR loop inside an event case.

  • This loop is set to 3 iterations because of 3 available plots: set the number of iterations to 6 when there are 6 plots now.
  • Inside the loop one plot is set to visible, the others to invisible: change the condition according to your requirements so you set two plots visible…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Highlighted
AJcpt
Member

Re: Toggle between waveform charts

I'm not sure how to edit the for loop to make for this change. Everything I have tried does not seem to work.