LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A way/workaround to set plot bounds of a stacked plot chart?

On a chart with stacked plots I would like to set the left plot bound programmatically. When trying this I noticed setting this property doesn't have any effect. I found then in the LV help, that

 

"... If it is a stacked chart, this property returns the bounds of the first plot area. You cannot set the plot area bounds for a stacked chart."

 

http://zone.ni.com/reference/en-XX/help/371361H-01/lvprop/graphchart_plot_area_bnds/

 

Ok, so if this is not possible, is there a workaround?

 

Personally I would have expectedthat for a stacked plotsetting the left plot bound is simply applied to the plot bounds of all stacked plots in the chartI wonder why it was not implemented like this.

 

PS.: I know about the right-click menu item Advanced>Auto Adjust Scales, but then the left side of the plot can be quite nervous, so I would like to set it programmatically depending on the user-selected significant digits during run-time.

 

 

 

0 Kudos
Message 1 of 6
(4,834 Views)

Hi David,

 

workaround: create a unique chart for each of your stacked plots (and edit them to look like stacked ones...)!

Best regards,
GerdW


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

Thanks GerdW for your idea. I think your proposition is an option for someone starting from scratch and not needing resizing of the stacked plots chart. In my case there's already quite a framework adapted to stacked plots behind and also resizing is needed, which would be a bigger effort to adapt for separate plot charts. I am still hoping for some direct way to set these plot bounds.

 

I am a bit disappointed that the NI charts developers did simply say "... you cannot set the plot area bounds for stacked chart.." instead of finding a solution like allowing setting stacked plot chart plot bounds for Top and Bottom and applying Left and Right bounds directly to all stacked plots in the chart. Or am I missing something and it's possible?

0 Kudos
Message 3 of 6
(4,812 Views)

Hi David,

 

when the help says "...you cannot..." then I expect I cannot change that setting. If you think, we all need that feature you should write an idea in the LabVIEW-Idea forum!

 

Even when you already have a "framework": what's the hard fact that hinders you to use 4 plots on 4 charts instead of 4 plots on one chart? When the framework is done nicely you only have to replace a single reference by an array of 4 references...

Best regards,
GerdW


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

Hi Gerd, about the LV idea exchange, you're right I should put it there, though I think this topic is such a specific one, that it interests not many guys and will never get enough votes...

 

I posted my message as I was wondering whether there's some easy way I was missing to resolve my issue quickly. 

 

About the framework and the idea to replace a stacked plots chart with a number of standard charts, of course the better the framework the less is to modify. The hard fact is that it's not just the exchange of the reference. It's part of a software for about 400 users with different Graph and Chart classes, where Mouse and Key Zoom and Pan actions are integrated, customized Autoscale, Right-click Menu etc. and stacked plots are a bit special to treat with their separate scales. Linking the x-Scales would be needed, and then as I mentioned in my message above I think the biggest effort would be to have it all resizable.

0 Kudos
Message 5 of 6
(4,771 Views)

I posted the desired behavior of setting the plot bounds for a stacked chart here in the LV Idea Exchange.

0 Kudos
Message 6 of 6
(4,759 Views)