New to Telerik UI for .NET MAUIStart a free 30-day trial

Represents the abstract base class for all chart axis types, such as CategoricalAxis, NumericalAxis, and DateTimeAxis, that can be added to the Axes collection of a RadCartesianChart.

Definition

Namespace:Telerik.Maui.Controls.Charts

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public abstract class ChartAxis : StyleableElement

Inheritance: objectChartAxis

Derived Classes: CategoricalAxisDateTimeAxisNumericalAxis

Constructors

Initializes a new instance of the ChartAxis class.

C#
public ChartAxis()

Fields

LabelIntervalProperty

BindableProperty

Identifies the LabelInterval bindable property.

C#
public static readonly BindableProperty LabelIntervalProperty

LabelStyleProperty

BindableProperty

Identifies the LabelStyle bindable property.

C#
public static readonly BindableProperty LabelStyleProperty

LineColorProperty

BindableProperty

Identifies the LineColor bindable property.

C#
public static readonly BindableProperty LineColorProperty

LineThicknessProperty

BindableProperty

Identifies the LineThickness bindable property.

C#
public static readonly BindableProperty LineThicknessProperty

LocationProperty

BindableProperty

Identifies the Location bindable property.

C#
public static readonly BindableProperty LocationProperty

MajorTickColorProperty

BindableProperty

Identifies the MajorTickColor bindable property.

C#
public static readonly BindableProperty MajorTickColorProperty

MajorTickLengthProperty

BindableProperty

Identifies the MajorTickLength bindable property.

C#
public static readonly BindableProperty MajorTickLengthProperty

Identifies the MajorTickThickness bindable property.

C#
public static readonly BindableProperty MajorTickThicknessProperty

PlotAreaProperty

BindableProperty

Identifies the PlotArea bindable property.

C#
public static readonly BindableProperty PlotAreaProperty

ShowLabelsProperty

BindableProperty

Identifies the ShowLabels bindable property.

C#
public static readonly BindableProperty ShowLabelsProperty

StyleProperty

BindableProperty

Identifies the Style bindable property.

C#
public static readonly BindableProperty StyleProperty

Properties

Gets or sets the interval, expressed as a number of tick positions, at which axis labels are drawn. For example, a value of 2 renders a label at every other tick and hides the label at the remaining ticks, which is useful for thinning out labels on axes with many categories or a large range. The value must be greater than 0; the default is 1, which shows a label at every tick.

C#
public int LabelInterval { get; set; }

Gets or sets the font and color settings applied to this axis' labels. Set to null (the default) to use the appearance defined by the active theme.

C#
public Style LabelStyle { get; set; }

Gets or sets the color used to draw the main axis line. Set to null (the default) to use the color defined by the active theme.

C#
public Color? LineColor { get; set; }

Gets or sets the stroke thickness, in device-independent units, of the main axis line. The default value is 1.0.

C#
public double LineThickness { get; set; }

Gets or sets the edge of the plot area along which this axis is laid out. The default value is Bottom.

C#
public ChartAxisLocation Location { get; set; }

Gets or sets the color used to draw the major tick marks along the axis line. Set to null (the default) to use the color defined by the active theme.

C#
public Color? MajorTickColor { get; set; }

Gets or sets the length, in device-independent pixels, of each major tick mark measured perpendicular to the axis line. The default value is 4.0.

C#
public double MajorTickLength { get; set; }

Gets or sets the stroke thickness, in device-independent units, of each major tick mark. The default value is 1.0.

C#
public double MajorTickThickness { get; set; }

Gets or sets the named PlotArea this axis belongs to when the owning chart defines multiple plot areas. Leave this property null to associate the axis with the chart's default plot area.

C#
public ChartPlotArea PlotArea { get; set; }

Gets or sets a value indicating whether tick labels are drawn along this axis. Set to false to hide labels while still rendering the axis line and ticks. The default value is true.

C#
public bool ShowLabels { get; set; }

Style

Style

Gets or sets the style applied to this axis.

C#
public Style Style { get; set; }

Methods

Called after the value of LabelInterval changes. Override this method in a derived class to perform additional processing when the label thinning interval changes. The base implementation performs no action.

C#
protected virtual void OnLabelIntervalChanged(int oldValue, int newValue)
Parameters:oldValueint

The label interval before the change.

newValueint

The label interval after the change.

Called after the value of Location changes. Override this method in a derived class to perform additional processing when the axis is moved to a different edge of the plot area. The base implementation performs no action.

C#
protected virtual void OnLocationChanged(ChartAxisLocation oldValue, ChartAxisLocation newValue)
Parameters:oldValueChartAxisLocation

The axis location before the change.

newValueChartAxisLocation

The axis location after the change.

Called after the value of PlotArea changes. Override this method in a derived class to perform additional processing when the axis is reassigned to a different plot area. The base implementation performs no action.

C#
protected virtual void OnPlotAreaChanged(ChartPlotArea oldValue, ChartPlotArea newValue)
Parameters:oldValueChartPlotArea

The plot area the axis was previously associated with, or null.

newValueChartPlotArea

The plot area the axis is now associated with, or null.