Skip to main content

NumericAxisY.LogarithmicOptions Property

Provides access to options that enable and configure the logarithmic scale for the axis.

Namespace: DevExpress.Maui.Charts

Assembly: DevExpress.Maui.Charts.dll

NuGet Package: DevExpress.Maui.Charts

Declaration

public AxisLogarithmicOptions LogarithmicOptions { get; set; }

Property Value

Type Description
AxisLogarithmicOptions

An object that stores the axis’ logarithmic scale settings.

Remarks

A y-axis can use a logarithmic scale to display numeric values. To enable and configure the logarithmic scale for NumericAxisY, set the axis’ LogarithmicOptions property to an AxisLogarithmicOptions object and specify the following settings:

  1. Set the Enabled property to true.
  2. Use the Base property to define the base of the logarithm (the default value is 10).

The axis forms its logarithmic scale as follows. The axis calculates a base axis value - the minimum absolute value that is the power of the Base. These calculations are based on absolute values of data point values that the axis measures. Then, the axis marks positive and negative base values on the axis and next, positive and negative values that are the power of the Base. Note that if data point values do not contain positive or negative values, the appropriate semi axis is not plotted.

Usually, the logarithmic scale is used when the data range of a chart’s series has significant disparity. In this case, the chart’s numerical axes display all values using logarithmic equivalents. In short, if the base of the logarithm is 10, only 5 uniform axis steps will exist between 10 and 1,000,000.

Example

This example shows how to enable the logarithmic view for a y-axis:

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

    <dxc:ChartView.AxisY>
        <dxc:NumericAxisY>
            <dxc:NumericAxisY.LogarithmicOptions>
                <dxc:AxisLogarithmicOptions Enabled="True" Base="10"/>
            </dxc:NumericAxisY.LogarithmicOptions>
        </dxc:NumericAxisY>
    </dxc:ChartView.AxisY>
</dxc:ChartView>
See Also