Skip to main content

NumericAxisY.LabelValueNotation Property

Gets or sets whether scientific or engineering notation is used to display numbers within axis labels. This is a bindable property.

Namespace: DevExpress.Maui.Charts

Assembly: DevExpress.Maui.Charts.dll

NuGet Package: DevExpress.Maui.Charts

Declaration

public AxisLabelNotationBase LabelValueNotation { get; set; }

Property Value

Type Description
AxisLabelNotationBase

An AxisLabelScientificNotation or AxisLabelEngineeringNotation object.

Remarks

If numeric axis labels contain numbers that are too large or too small, you can use scientific or engineering notation to display these numbers.

Normalized and E Notations

  1. Assign an AxisLabelScientificNotation object to the LabelValueNotation property.
    In scientific notation, a number is displayed as m×10ⁿ, where the coefficient m is any real number, and the exponent n is an integer.
  2. Set the AxisLabel.TextFormat property to “#E+0”.
  3. Set the AxisLabelScientificNotation.ScientificNotation property to the Normalized (default) or E value.
    In normalized notation, the exponent n is selected so that the coefficient m is at least 1 but less than 10.
    In E notation, ×10 is replaced with E.
    ScientificNotation

This example shows how to convert numbers that Y-axis labels display to normalized notation.

ScientificNotation - Normalized

<dxc:ChartView>
    <dxc:ChartView.Series>
        <!-- Series data. -->
    </dxc:ChartView.Series>

    <dxc:ChartView.AxisY>
        <dxc:NumericAxisY>
            <dxc:NumericAxisY.LabelValueNotation>
                <dxc:AxisLabelScientificNotation/>
            </dxc:NumericAxisY.LabelValueNotation>
            <dxc:NumericAxisY.Label>
                <dxc:AxisLabel TextFormat="#E+0"/>
            </dxc:NumericAxisY.Label>
            <!-- Other settings of the Y-axis. -->
        </dxc:NumericAxisY>
    </dxc:ChartView.AxisY>

    <dxc:ChartView.AxisX>
        <!-- The X-axis settings. -->
    </dxc:ChartView.AxisX>
</dxc:ChartView>

Logarithmic Notation

Logarithmic notation can use bases other than 10 (for example, m×2ⁿ).

  1. Assign an AxisLabelScientificNotation object to the LabelValueNotation property.
  2. Set the AxisLabelScientificNotation.ScientificNotation property to Logarithmic.

This example shows how to apply logarithmic notation to labels of an X-axis that uses the logarithmic scale to display numeric values. This notation uses powers of a base that the AxisLogarithmicOptions.Base property defines (10, in this example).

ScientificNotation - Logarithmic

<dxc:ChartView >
    <dxc:ChartView.Series>
        <!-- Series data. -->
    </dxc:ChartView.Series>

    <dxc:ChartView.AxisX>
        <dxc:NumericAxisX>
            <dxc:NumericAxisX.LogarithmicOptions>
                <dxc:AxisLogarithmicOptions Enabled="True" Base="10"/>
            </dxc:NumericAxisX.LogarithmicOptions>
            <dxc:NumericAxisX.LabelValueNotation>
                <dxc:AxisLabelScientificNotation ScientificNotation="Logarithmic"/>
            </dxc:NumericAxisX.LabelValueNotation>
            <dxc:NumericAxisX.Label>
                <dxc:AxisLabel TextFormat="# Hz"/>
            </dxc:NumericAxisX.Label>
            <!-- Other settings of the X-axis. -->
        </dxc:NumericAxisX>
    </dxc:ChartView.AxisX>

    <dxc:ChartView.AxisY>
        <dxc:NumericAxisY>
            <dxc:NumericAxisY.LogarithmicOptions>
                <dxc:AxisLogarithmicOptions Enabled="True" Base="10"/>
            </dxc:NumericAxisY.LogarithmicOptions>
            <dxc:NumericAxisY.Range>
                <dxc:NumericRange SideMargin="0" Min="0.01" Max="100"/>
            </dxc:NumericAxisY.Range>
            <!-- Other settings of the Y-axis -->
        </dxc:NumericAxisY>
    </dxc:ChartView.AxisY>
</dxc:ChartView>

Engineering Notation

Engineering notation is similar to scientific notation (m×10ⁿ), except that the power of ten must be divisible by three. This notation can also use SI prefixes. Assign an AxisLabelEngineeringNotation object to the LabelValueNotation property to convert numbers displayed in axis labels to engineering notation.

This example shows how to use engineering notation to display X-axis labels with large numbers (e.g., millions) that take up a large amount of space when shown in decimal (default) form.

<dxc:ChartView>
    <dxc:ChartView.Series>
        <!-- Series data. -->
    </dxc:ChartView.Series>

    <dxc:ChartView.AxisY>
        <dxc:NumericAxisY>
            <dxc:NumericAxisY.LabelValueNotation>
                <dxc:AxisLabelEngineeringNotation/>
            </dxc:NumericAxisY.LabelValueNotation>
            <dxc:NumericAxisY.Label>
                <dxc:AxisLabel Position="Inside" TextFormat="$#"/>
            </dxc:NumericAxisY.Label>
            <!-- Other settings of the Y-axis -->
        </dxc:NumericAxisY>
    </dxc:ChartView.AxisY>

    <dxc:ChartView.AxisX>
        <!-- The X-axis settings. -->
    </dxc:ChartView.AxisX>
</dxc:ChartView>
See Also