SetAxisScalingMode

I'm upgrading from the old code from version 5.5 CVI to version 9.0 and I noticed that the SetAxisScalingMode function works differently in a chart of the band he has in the past.

In Rev 5.5 every time that SetAxisScalingMode has been called the data in the tape was erased and started above the left side.  In version 9.0, the data are deleted is no longer.  I like this.

My questions are

This was done on purpose, and it will remain like this?

Is there a place that offers a complete history of changes for a feature like this?

Subsequently

Walleye

Yes, the change was deliberate and it will stay like that. This has always been a crappy limitation - almost a bug. And when the graph is updated in version 8.5, this limitation has been removed.

I checked the 8.5 readme file to see if this change in behavior has been mentioned, but it wasn't. It probably should be. Update notes 8.5 version to mention some aspects of the band list, but it was also not mentioned. So from what I can tell, the only change that has been done, documentation-wise, was the deletion of this phrase by using function of SetAxisScalingMode: "If you use this function to change the y-axis of a chart of the band, the graph is disabled and all existing data will be deleted."

Luis

Tags: NI Software

Similar Questions

  • How to restore a chart on initial zoom

    Hello

    Sorry if this seems to be a silly question but I am new on this!

    Basically I have a field that I want the user to be able to zoom in to examine a little bit and then be able to click on a command button "Reset Zoom" to return to the initial display.

    I'm fine with the initial zoom bit, but reset the zoom to the original, this is where I'm having problems. Can you please recommend the best way to go about this?

    Thank you very much

    One possibility would be to have a reminder of graphic command with a test on EVENT_ZOOM; for the first time (after start-up or reset), you can use GetAxisScalingMode to get the minimum and maximum of the scale of the axis.

    In your reminder reset button, you can then use these min/max values to restore the original range of axis using SetAxisScalingMode.

    Good luck, Wolfgang

  • event for "command to the top button" necessary

    Hello

    I have a command button which would have the following measures:

    While it is pushed down, zoom a graph in a predefined area.

    If it is rejected, zoom out

    I don't want to use a toggle button.

    What I did: on EVENT_LEFT_CLICK: SetAxisScalingMode to the desired region, if EVENT_LEFT_CLICK_UP set the scale mode for the region of origin.

    Therefore, as long as the user presses the button, chart is zoomed in, you like.

    Now, there's one small drawback: the user can (unintentionally) 'cheat' and pushing the button, move the mouse cursor away: in this case there is no case of left_click_up more...  I tried using "lost_focus", but this happens only much later, when the user clicks a control. And I tried EVENT_MOUSE_POINTER_MOVE, but it is not practical either: any thrill will zoom out.

    Does anyone have a suggestion/tip to get the desired result?

    Thank you!

    You can then use EVENT_MOUSE_POINTER_MOVE with GetCtrlBoundingRect() to know when the user has moved the pointer of the mouse over the button.  You use the reminder of Panel to do this, because you would not get an EVENT_MOUSE_POINTER_MOVE event in the recall of order once the mouse had moved the off button.  To be more of course, you could also look for EVENT_LOST_FOCUS just in case the user is somehow able to get the cursor of the mouse on the Panel without triggering an EVENT_MOUSE_POINTER_MOVE event somewhere off the coast of the key first.

  • Scale chart

    Hello

    I am using the following fuctions draw a graph in visual studio using the labview includes libs:

    InitCVIRTE();

    NewPanel();

    NewCtrl();

    DisplayPanel();

    SetAxisScalingMode();

    PlotStripChart();

    Can I change the size of the window to the background by changing the values of the function NewPanel, but I Don t know how to change the size of the chart. I want it to fill most of the screen. I also tried with SetAxisScalingMode function, but it has not changed the size og the graph it only changed the scaling.

    How can I change the size og the graph?

    BR

    Benjamin

    Parameter ControAttribute specifies the attribute that you want to set. In your case, you must call SetCtrlAttribute twice: once with ATTR_WIDTH of attribute, the other with ATTR_HEIGHT.

    Dimensions are expressed in pixels.

  • Problem with autoscaling after graphical zoom

    Hello

    I am struggling to find my error in reasoning, but so far has failed, and would be very grateful for the help.

    My problem seems to be very basic: I have a graph of control with zoom option enabled, for example rectangle zoom or zoom for y. There is a playground on the graph, plot zoom in part of the works as expected.

    Now I would like to restore the graph, that is, set it to full scale showing the complete route once again, using SetAxisScalingMode.

    Stupid enough he not always seems to work, the shaft is not properly set, i.e. that the enlarged part of the plot is visible even after affecting the autoscale axis...? I don't remember what I'm missing here.

    I have prepared a demonstration simple, based on the NOR sample userint\GraphAnnotations.cws, attached below.

    In this example, I made two small changes: 1) I have added a "restore" button to set the x and axis Auto scale value. (2) in the IUR, I changed the style of graphical zoom to rectangle Zoom (Zoom or to y)

    To reproduce the problem, press "Draw", zoom in on the graph so that the maximum and minimum of the plot are not displayed. Press the button restore, which will show the complete graph. Fine. But now zoom in again, press the button restore: now, it seems most do anything.

    Thank you!

    The problem is that when you set the mode to automatically scale the second time, it is already set to auto. Because no changes were made, the chart has no need to recalculate the scale. If you plotted instead of a new data point, you would see the autoscaling come back into force. A simple way to force it to recalculate the scale would be to scale to VAL_LOCK, then return to VAL_AUTOSCALE in the RestoreCallback. Because the value of the attribute is changing, a new drawing occurs which causes the Auto scale to recalculate.

                            SetAxisScalingMode (panel, PANEL_GRAPH, VAL_LEFT_YAXIS, VAL_LOCK, 0.0,
                                    0.0);
                SetAxisScalingMode (panel, PANEL_GRAPH, VAL_BOTTOM_XAXIS, VAL_LOCK,
                                    0.0, 0.0);
                SetAxisScalingMode (panel, PANEL_GRAPH, VAL_LEFT_YAXIS, VAL_AUTOSCALE,
                                    0.0, 0.0);
                SetAxisScalingMode (panel, PANEL_GRAPH, VAL_BOTTOM_XAXIS,
                                    VAL_AUTOSCALE, 0.0, 0.0);
    
  • the control is not of the type expected by the function.

    Hello!!

    I'm creating a 3-d chart with the library CW 6.0 3D graph.

    I would not have a graph autoplot... and I'm looking how to... How can I put my values on the axis?

    I tried with SetAxisScalingMode, but it does not work... I got the error: the control is not of the type expected by the function.

    Thank you

    Adeline

    SetAxisScalingMode is intended for standard user interface graphics, that 3D graphics CW isn't. This ActiveX control has a completely different programming interface and the integration of 3DGrpahCtrl.fp in the project. The instrument driver provides all functions related to the chart control 3d. You can set axes scales for example with CW3DGraphLib_CWAxis3DSetMinMax)

  • Change zoom on a chart programmatically?

    I'm looking to add a few buttons or hotkeys to a chart control that allows you to zoom in or out a specific amount, or would zoom to adjust horizontally or vertically, but I can't find a way to change the zoom on a graph by programming (in LabWindows/CVI 9.0) - only features zoom/attributes I find are on-AutoScaling and other. Anyone know what kind of features, I would use if I wanted to change the current view on a chart control programmatically?

    Hello

    you will get a zoom setting the mode of scaling to the manual. For example,.

    SetAxisScalingMode (panels, PANEL_GRAPH, VAL_BOTTOM_XAXIS, VAL_MANUAL, zoom_x_min, zoom_x_max);

    adjust the x axis to the range given by zoom_x_min and zoom_x_max. It is the same for the vertical axis.

Maybe you are looking for