03-05-2019 05:09 AM
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
03-12-2019 10:57 AM - edited 03-12-2019 10:58 AM
Can somebody from NI kindly help on this issue please? Much appreciated.
03-14-2019 02:59 PM
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.