LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[LV2015]: Graph modifies X scale range when changing Y scale?

Solved!
Go to solution

I need to have a waveform graph or chart show a fixed grid, at least on the X scale.

This is accomplished by setting the "Increment" and "MinorInc" properties of the respective graph/chart and is working fine...

 

...unless you change the Min/Max values of the Y scale, which changes both the X scales' "Increment" and "MinorInc" properties.  Is this the intended behaviour? I'm listening for Scale Range Change and Autoscale Range Change events, but nothing is fired for the X scale.

 

To reproduce, just start the attached VI and follow these steps:

1) Set the Y scale max to 1

2) Press the "Set X-grid"-button

3) Set the Y scale max to 8

 

0 Kudos
Message 1 of 4
(2,770 Views)

One of the problem is that you use an x-axis style that does not even have markers, and the formatting of the markers is set to show zero decimal digits.

 

Once you set it to a scale style with actual tick marks, enlarge the graph in the x-direction so the desired ticks can even be displayed, and set the x-scale formatting to show at least 1 decimal digit, things work just fine, it seems.

0 Kudos
Message 2 of 4
(2,757 Views)

This has to be a bug.

Your version is indeed working, even if the graph is resized to the small size again (WaveformGraph_resized.vi).

If I configure my graph to the same X scale style and X scale formatting, it still doesn't work - despite the graph having the same size (WaveformGraph_original.vi).

Download All
0 Kudos
Message 3 of 4
(2,744 Views)
Solution
Accepted by topic author SchiSchi

You also need to disable "right-click...advanced...autoadjust scales". This is enabled by default and will change the length (in pixels) of the scales to make room if the markers need more space. In your case, the y markers change between 0 and 1 decimal digits, depending on the range.

 

Whenever an axis changes in length, the markers are re-optimized for the available space.

Message 4 of 4
(2,726 Views)