Back to Devexpress

AxisLabel Class

mobilecontrols-devexpress-dot-xamarinforms-dot-charts-30ef16d8.md

latest2.6 KB
Original Source

AxisLabel Class

Stores axis label settings.

Namespace : DevExpress.XamarinForms.Charts

Assembly : DevExpress.XamarinForms.Charts.dll

NuGet Package : DevExpress.XamarinForms.Charts

Declaration

csharp
public class AxisLabel :
    AxisLabelBase

The following members return AxisLabel objects:

Remarks

The AxisLabel class properties define axis label settings:

  • TextFormat - Specifies axis labels’ text format pattern.
  • Position - Specifies the position of axis labels.
  • Style - Provides access to axis label appearance settings (text color and size).
  • Visible - Allows you to show and hide axis labels.

To configure axis labels, assign an AxisLabel object with the specified properties to the axis’s Label property.

The following example shows how to modify axis labels of a date-time X-axis and numeric Y-axis:

xaml
<dxc:ChartView>
  <dxc:ChartView.AxisX>
    <dxc:DateTimeAxisX>
        <dxc:DateTimeAxisX.Label>
            <dxc:AxisLabel TextFormat="yyyy"/>
        </dxc:DateTimeAxisX.Label>
    </dxc:DateTimeAxisX>
  </dxc:ChartView.AxisX>
  <dxc:ChartView.AxisY>
      <dxc:NumericAxisY>
          <dxc:NumericAxisY.Label>
            <dxc:AxisLabel TextFormat="$#K" Position="Inside"/>
          </dxc:NumericAxisY.Label>
      </dxc:NumericAxisY>
  </dxc:ChartView.AxisY>
</dxc:ChartView>

Implements

INotifyPropertyChanged

Inheritance

Object ChartElement StyledElement AxisLabelBase AxisLabel

See Also

AxisLabel Members

DevExpress.XamarinForms.Charts Namespace