Skip to main content
A newer version of this page is available. .

AxisBase.LabelTemplate Property

Specifies a template that defines a custom appearance and look-and-feel for axis labels.

Namespace: DevExpress.WinUI.Charts

Assembly: DevExpress.WinUI.Charts.v22.1.dll

NuGet Package: DevExpress.WinUI

Declaration

[DP(null, Handler = "UpdateActualAxisStyleSetting")]
public DataTemplate LabelTemplate { get; set; }

Property Value

Type Description
DataTemplate

A data template.

Remarks

The following example customizes font color and size of x-axis labels:

Axis label template

<Charts:CartesianChart.AxisX>
    <Charts:AxisX>
        <Charts:AxisX.LabelTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding Text}" 
                           FontSize="16" 
                           Foreground="Black" /> 
            </DataTemplate>
        </Charts:AxisX.LabelTemplate>
    </Charts:AxisX>
</Charts:CartesianChart.AxisX>
See Also