Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use EndLabelsAlwaysVisible on ni:AxisDouble?

Solved!
Go to solution

Hi, I can't figure out where to use this setting.  Could someone please provice an example in XAML?

Thank you!

0 Kudos
Message 1 of 6
(3,375 Views)

By the way, the reason I need it is this...

I have a set of 8 graphs that need to fit in one Window... All with the same scale so it's pointless to have X-axis listed for every graph and I need to save my precious space.  I also want the ability to maximize every graph to full screen via a double-click.

 

So to make it all work I decided to add a "dummy" 9th graph at the very bottom and have X-axis enabled only on this graph.  And I made this 9th graph Height=38 so that the graph area itself is not visible (just the X-axis).

Problem is that I still see Y-axis End Label (I highlighted it in pic).

Another problem I foresee is if I hide Y-axis End Labels, then the visible X-axis in 9th graph will be misaligned with all invisible X-axis.... because the visible X-axis is automatically adjusted based on Y-axis End Label number length.  This is what happens when I simply hide Y-axis on the 9th graph.

 

Is there any better way to do all this?  Any help appreciated!  Thanks!

 

0 Kudos
Message 2 of 6
(3,360 Views)

I would suggest changing the Visiblity of the Y axis to Hidden (which should maintain the size, as opposed to Collapsed will will remove it).

 

Edit: You may also want to look at MinimumLabelAlignment/MaximumLabelAlignment on your MajorDivisions, to align the Y axis labels closer to their respective graphs.

~ Paul H
0 Kudos
Message 3 of 6
(3,355 Views)

Thanks!  That almost does the trick but one little issue still remains...

When I maximize one of those 8 graphs, "Y" AxisDouble starts displaying decimal points (between Min/Max) and this shifts its X-axis.  But the "dummy" 9th graph is still at default with no decimal points and no shift happens there.

 

Any way to disable automatic switch to decimal point?  Or force decimal point on demand?

Thanks!

 

0 Kudos
Message 4 of 6
(3,340 Views)
Solution
Accepted by kirko7

There are two ways to address this: either change Mode, so that only non-decimal divisions will be generated, or change LabelPresenter, so that all divisions will be formatted with a fixed precision. For example, you could use Mode="Count: 3" to only show the minimum, maximum, and center; or Mode="Interval: 0, 1" to show "0,1,2,..." values (or create a custom mode that filters out the automatically generated decimal values).

~ Paul H
0 Kudos
Message 5 of 6
(3,335 Views)

That did it!  Thanks!

 

0 Kudos
Message 6 of 6
(3,326 Views)