Dynamically resizing stacked plots depending on visibility of scale

Hi,
is there a way to change plot width in a chart with stacked plots, depending on visibility of scales and number of digits of scales _and_ without resizing width of the chart when all scales are invisible?
The problem: when all scales are invisible and the number of digits increases, the chart's width decreases and the scales move a little to the left.
Thanks a lot in advance.
Cheers,
Martin

Hello Martin,
Could you please attach some sample code of your question. Also, if would be really helpful if you could document the front panel of the code with what to do in order to see the problem you are seeing with the chart's width decreasing.
Thanks.

Similar Messages

  • Change properties inside dynamic stack plots

    Is there any way in LabView 8.2 now to change the properties of indicators inside an array or cluster?  I want to change the properties of the waveforms inside DynamicStackPlots (http://zone.ni.com/devzone/cda/epd/p/id/3024).  I see on this forum back in 2005 this was last discussed.  I have also tried making a cluster of waveforms (instead of an array of clusters) from which you can at least separately access properties (allowing you to make specific waveforms not visible, yielding dynamic stack plot functionality).  But you STILL cannot modify, say, the plot min range, label, scale... etc.
    All ideas welcome!
    Thanks,
    Adam

    Hi, Adam.
    This question seems to pop up every once in a while. The answers are different for arrays and clusters:
    Clusters
    You can access the properties using an explicitly-linked property node (IE, one that takes a control reference as an input). You can obtain a reference to the controls in one of two ways:
      - Right-click on the control (inside the cluster) and select Create»Reference.
      - Create a property node for the cluster and access the Controls[ ] property. This will give you an array of references to the controls inside the cluster, and you can pass that into the explicitly-linked property node. (You may have to use a To More Specific Class VI if you want to access properties that apply to only graphs.)
    Arrays
    Since arrays are for holding a large quantity of indentical data types, the properties for all elements of the array must be the same. If you really want to sidestep this functionality, however, you can always create an array of references to controls. If you wanted to do that, you'd have to create all your controls individually and then create references for them one by one. Once the references are created you can pass them into a Build Array VI. To alter the properties of any particular control, you'd use an explicitly-linked property node and pass in the appropriate reference.
    Let me know if any part of this isn't clear. Have a nice evening!
    Message Edited by sarahk on 10-25-2006 04:35 PM
    Sarah K.
    Search PME
    National Instruments
    Attachments:
    clusterControlReference.GIF ‏6 KB

  • Dynamically stacked plots of chart

    In LV 2009 it is still not possible to set the number of stacked plots of a chart programmatically. Is there any useable workaround?
    Before I start measurement I know how many channels I will acquire – between 1-16.
    Before the measurement starts I want the chart to display as many plots as I have charts
    I am building exe in the end (in linked thread is proposed some workaround that doesn't work in executables)
    My only suggestion so far is to use 16 stacked plots and play with their height and position to hide and show them = not very friendly. Thanks for any suggestion
    Message Edited by ceties on 01-12-2010 03:28 PM
    LV 2011, Win7
    Attachments:
    StackedPlots.vi ‏14 KB

    If you somehow manage to execute the program with "overlayed" plot selected (with the number of stacked plots wired to the property node )and then switch back o "stack plots" progrmatically i think you can solve this...
    Guru
    Regards
    Guru (CLA)

  • Stacked plots

    Is there a way to have a stacked "Waveform Chart" with 8 stacked charts but display 16 plots, 2 on each chart?

    Ok I found a way to do this.  It is not exactly straight forward but the attached VI and control show what you want.  The secret is in customizing the graph and using the "Y Scale Index" property.
    Follow these steps and you should be golden.
    1. Create your stacked plot with the 16 plots.  So you will have 16 tiny little plot areas... no worries.
    2.  Take a look at the attached code and see how you can select the active plot and then the Y Scale Index associated.
        You at the moment have 16 plots and 16 Y scales.  Simple change the Y scale index of the last 8 plots to be 0-7. 
    3. Try that and notice you now 16 plot areas 8 plots with 2 plots on it, and then 8 that are empty.
    4. The last thing is to get rid of the 8 "blanks".
    5. Select the last 8 plots and make their Y scales not visible.
    6. Finally right click on the chart and select customize.
    7. Select window>> Show Parts Window.  In that new window you can find the last 8 plots, and set their hieght to 1, and change their location.  I suggest moving them under the top plot. 
    8. At this point you have a lot of free space.  Select one of the remaining plots and increase its height to what looks good for just one plot area.  Then select the 8 that you want to show and you can use the "Resize Objects" ring in the tool bar to make them all the same size.  Move them to where you want and bingo.
    9.  You should now have 8 visible plots, and 8 that are hidden.  Save the control and replace the one on your Front Panel.
    You should be done.  Let me know if or where you get lost because I know this is kinda strange.
    Evan
    Attachments:
    Overlaid graphs.ctl ‏31 KB
    Overlaid graphs.vi ‏50 KB

  • How do you programmatically switch between a stack plot and an overlay plot with a waveform control?

    One method i realize is to have two waveform controls, one visible and one not visible. The real issue here is, how to dynamically control the number of plots in a stacked plot. My case,
    i will have between 2 and 8 channels. I have found that in the properties if i set the number of plots - Legend--Plots shown . I can control the number of stack plots, however, i must toggle from overlay to stack plots in design mode for the correct number of stack plots to be shown. Does anyone know a way around this problem or know of the property that has alluded me?

    Hi,
    You cant select between Stack plot and Overlay programmatically. Well not in LaBVIEW 5.1.1.
    You could have two Charts, one set up for Overlay and the other setup for Stacked. Then hide the one you are not immediately using.
    Ray.
    Regards
    Ray Farmer

  • "Fill base line"/"Fill to" problem within stack plots

    Hi there,
    I try to plot multi data sets within the stack plots waveform chart. But I can't control the Fill To option correctly for the plots other than the first plot in the window. As attached, even I set the fill baseline to zero for the second plot (the green one) in the first window, it performs like fill to -infinity. I am using Labview 2010 DS2.
    Any solution? Or, I made any mistake here?
    Thanks.
    Attachments:
    Stack Plot Fill Baseline.vi ‏12 KB

    I agree things behave a bit weird if the number of traces is not a multiple of the number of stacked plots. Do you want three stacked plots or have two traces share one of the plots? Maybe you should use more defined data structures, e.g. an array where each element is a clusters of size=3.
    Try the following:
    resize the plot legend so 4 stacked plots show.
    Now resize it again for two stacked plots.
    In my case, the fill to zero is now correct.
    LabVIEW Champion . Do more with less code and in less time .

  • Question to Swing Pros: Resizing of JFrame only with visible Rectangular  ?

    Hello folks,
    quite below is the quoted text message is from Java Substance Forum: http://www.nabble.com/Removing-top-left-substance-menu-and-deactivating-Background-painting-while-Resizing-a-Frame--to17775101.html
    Is it somehow possible to use substance or another LooknFeel with custom titelbar and still keeping a hidden JFrame background resizing? So if i resize a JFrame only a rectangular should be visible not the content of the window should dynamically resize.
    That would be a general Swing question to ask in Swing forums on java.net or on java.sun.com
    Thanks
    Kirill
    ----- Original Message ----
    From: PEL <liquidc4d@...>
    To: users@...
    Sent: Wednesday, June 11, 2008 9:07:36 AM
    Subject: Re: Removing top left substance menu and deactivating Background painting while Resizing a Frame?
    2. You would notice in your screenshots that you're running Substance
    under decorated mode, but Metal (and Windows) under undecorated mode
    (title pane coming from OS). Try running your app under decorated mode in
    Metal and see if the dynamic resizing is the same.
    Ok with decorated(false) the resizing of the frame shows only a border not
    the whole background of the frame, but then i have no stunning
    Glas3DDecoration painter :D
    Is it somehow possible to use substance with 3dglass titelbar and a hidden
    jframe background resizing?

    I've never seen a way to do that in Swing normally.
    Of course, if you could run something allowing transparent windows (some newer version of Java will support it, or Skin L&F, etc), I can imagine how you might fake it by using your own decorations, and on resize, create a transparent window with a border that is your resize window, and use that to resize, and then fix the final size to the real window when done.

  • Dynamically resizing DefaultMutableTreeNode

    Does anyone know how to resize a DefaultMutableTreeNode after it's been created and initially sized? I have a tree that can be resized, but if I dynamically resize it so that some nodes are wider than the tree, I'd like the last few visible characters within the nodes to be replaced by three dots "..." instead of just clipping the text. The JTable does this when you resize a column.
    Thanks,
    Steve Sinai

    I change the two lines below:
    1. This: textField.text = val        to this:  textField.htmlText = val;
    2.  This: return textField.text;     to this:  return textField.htmlText;
    Here we go:
    import flash.events.Event;
    import flash.text.StyleSheet;
    import mx.controls.TextArea;
    public class DynamicTextArea extends TextArea
       public function DynamicTextArea(){
          super();
          super.horizontalScrollPolicy = "off";
          super.verticalScrollPolicy = "off";
          this.addEventListener(Event.CHANGE, adjustHeightHandler);
        private function adjustHeightHandler(event:Event):void{
          //trace("textField.getLineMetrics(0).height: " + textField.getLineMetrics(0).height);
          if(height <= textField.textHeight + textField.getLineMetrics(0).height){
            height = textField.textHeight;     
            validateNow();
        override public function set htmlText(val:String):void{
          textField.htmlText = val;
          validateNow();
          height = textField.textHeight;
          validateNow();
        override public function set height(value:Number):void{
          if(textField == null){
            if(height <= value){
              super.height = value;
          }else{       
            var currentHeight:uint = textField.textHeight + textField.getLineMetrics(0).height;
            if (currentHeight<= super.maxHeight){
              if(textField.textHeight != textField.getLineMetrics(0).height){
                super.height = currentHeight;
            }else{
                super.height = super.maxHeight;         
        override public function get htmlText():String{
            return textField.htmlText;
        override public function set maxHeight(value:Number):void{
          super.maxHeight = value;

  • Plotting 6 curves in 3 stacked plots?

    I've got some filtered x,y, z coordinate data which I'm currently plotting to a waveform chart with stacked plots. How can I include the unfiltered data on the respective plots? 
    ie. 1 plot displaying x filtered and unfiltered together, y filtered and unfiltered together etc.
    Solved!
    Go to Solution.

    Hey Graham,
    Interesting question!! It has taken me a while to figure it out, but is certainly possible - even if the solution is a bit of a fiddle.
    Please see the attached code. To impliment your functionality, I had to...
    Bundle all plots (in this case 4) in to a single cluster, and send them into a "stacked chart".
    Resize the plot legend to show all 4 plots.
    Right click each item in the legend, navigate to Y-Scale and then select which window you would like to show the plot (1-4)
    This means that 2 of the windows will show 2 plots each, and 2 of the windows will be empty. Unfortunately, I was unable to "hide" a window - so this is where the "fiddle" comes in - I just resized and repositioned each of the "windows" to effectively only show 2 of them in our stacked chart.
    I hope this has been useful Graham,
    Best wishes,
    Rich R
    Applications Engineer
    National Instruments UK & Ireland
    Attachments:
    StackedPlot.vi ‏18 KB

  • Stacked Plot y-axis property access.

    STACKED PLOT Y-AXIS
    I have a stacked waveform chart showing four plots
    Each plot correctly appears on a different sub-plot
    I can use the set active plot property to loop through the four plots and change their names, visibility etc.
    I can also read which is their active y scale index which corresponds to the plot index (i.e.both 0-3)
    BUT
    When I try and change a y scale property (e.g. label>text) it only ever changes the top sub plot label
    I have tried forcing the active Y-scale index also to no avail.
    I have also tried an overlay plot with 4 different y-axis and have the same problem.
    HOW DO I SET TEH INDIVIDUAL Y-SCALE PROPERTIES ON A STACKED PLOT?
    Attachments:
    stackedplot_yaxis_edit.zip ‏22 KB

    I made 2 small modifications to your VI, take a look at the attached.
    First you needed to set the active Y scale rather then setting the index. But more importantly the property node you are using to set the values is linked to the wrong graph.
    Let me know if the attached does what you where looking for.
    Attachments:
    stackedplot_yaxis_edit2.vi ‏66 KB

  • Moving object to back after dynamic resize

    I am running Crystal Reports 2008 on a Business Objects 3.1 environment.
    I have a textbox in a report that grows (width) depending on the number of records shown. The report is a cross tab, and I change the width change is to display a u201CSilveru201D box behind certain fields (to break up the report).
    I recieved help from Vinay to get the fields to expand correctly (Thank you), but now it appears the dynamic resizing is the final step taken befroe publiushing the report. I need the silver text field to go to the back of the report, allowing information in the cross tab itself to appear on top.
    Is there a  cr command (code) that sends the field to the back of the report?
    Thanks

    Please re-post if this is still an issue or purchase a case and have a dedicated support
    engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • How do I stop iPhone Safari from dynamically resizing the visual viewport?

    Sorry I post this here, but I couldn't access the developer forums (no error given, it just keeps returning me to this page https://developer.apple.com/devforums/) I'm not even sure wether that's been moved here and it's just the redirection non working.
    I need to Stop iPhone Safari from dynamically resizing the visual viewport, or in other words, to stop it from trying to "fit" the layout into the viewport.
    Why?
    Because any recalculation javascript does on absolutely positioned elements makes the whole site super IRRESPONSIVE.
    I don't know wether the issue is the element going out the already-set layout viewport (which triggers the page resizing to fit the visual viewport) or just the calculations being made constantly, but I can stop the calculations from happening when not "touching" the screen, but I need a way to stop the page resizing.
    I tried setting the viewport width to 1040px, as my layout width, and it fixed the header's width being narrower than the body (or shifted left?), but the whole page is still resized with every motion-frame (one every 3 seconds, due to overloading the redrawing engine)
    Is there a way to prevent that?

    No, that link doesn't solve it. It just says the same is found everywhere online.
    There's probably no way to do it, as per their way they "accidentally" omitted the oposite case: the page being wider than 980. They only mention what to do if the site is narrower. Something I learned is big companies (with reputation management) could let you run in circles for years no answer rather than telling you something is not possible.
    I'm the developer (can't access the dev forums, don't know why) and I DID setup the viewport, scale and other properties but none of them stopped from re-fitting the new re-sized layout in the viewport. They just ensure the "initial" view.
    I think the feature I'm looking for must be achieved with some JavaScript function targeting Safari-proprietary variable/property… if even possible.
    I just had to make things never reaching the edge until somebody contributes something useful

  • How to dynamically resize JPanel at runtime??

    Hello Sir:
    I met a problem, I need to resize a small JPanel called panel within a main Control JPanel (with null Layout) if I click the mouse then I can Drag and Resize this small JPanel Border to the size I need at runtime, I know I can use panel.setSize() or panel.setPreferredSize() methods at design time,
    But I have no idea how to do it even I search this famous fourm,
    How to dynamically resize JPanel at runtime??
    Can any guru throw some light or good example??
    Thanks

    Why are you using a null layout? Wouldn't having a layout manager help you in this situation?

  • Dynamic resizing in JDialog using setSize not working properly on solaris

    can anyone help..
    Dynamic resizing in JDialog using setSize is not working properly on solaris, its work fine on windows.
    i have set Jdialog size to setSize(768,364),
    when i dynamically resizing it to setSize(768,575); it doesn't get change but when i move dialog using mouse it gets refreshed.
    this problem is only happening on solaris not on windows.

    Hi,
    It's only an approach but try a call of validate() or repaint() after re-setting the size of your dialog.
    Cheers, Mathias

  • Xy graph with dynamic number of plots

    I've got an XY Graph with some dynamic number of plots to graph. Once I know this number, I change the LegPlots property and plot the data from an array containing all the plots. The data is displayed correctly, but I get overlapping colors. Say I'm only trying to graph 3 plots. I get three lines (good) but then the three lines have 29 colors (bad), as if it's plotting all possible plots at the data points of the three. The legend updates to only show three (good), but am I missing something else? Does the LegPlot property not govern that, but only governs the legend itself?

    If the problem is the code then I'll take a look at my mess of wire, I just wanted to see if it was the LegPlots property first.
    Here's what it looks like, just in case
    Attachments:
    toomanycolors1.JPG ‏25 KB

Maybe you are looking for