Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

AxisDouble YRange label presenter format

Hi,

 

I was trying to set the AxisDouble label presenter formatted by "0.00". But when the minimum value of Y Range is like 0.00123456, it shows the whole digital string instead of 0.00. This is my xaml, and attached is the plot view. What is missing here please?

 

<ni:AxisDouble x:Name="yAxis" Label="{Binding GraphYAxisLabel}" Orientation="Vertical" Range="{Binding YRange}" Adjuster="None">
    <ni:AxisDouble.MajorDivisions>
        <ni:RangeLabeledDivisions>
            <ni:RangeLabeledDivisions.LabelPresenter>
                <ni:GeneralValueFormatter Format="0.00" />
            </ni:RangeLabeledDivisions.LabelPresenter>
        </ni:RangeLabeledDivisions>
    </ni:AxisDouble.MajorDivisions>
</ni:AxisDouble>

 

Thanks,

Xu

 

0 Kudos
Message 1 of 3
(2,461 Views)

Can somebody from NI kindly help on this issue please? Much appreciated.

0 Kudos
Message 2 of 3
(2,409 Views)

The formatter internally does work to avoid displaying non-zero values as if they were zero. The formatter will try using both Format and ShortFormat for a non-zero value that displays as zero, so you could specify e.g. ShortFormat="0.00###" to control the number of digits displayed for near-zero values.

~ Paul H
0 Kudos
Message 3 of 3
(2,394 Views)