Log In
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Collapse]Charts Suite
   [Collapse]Chart Control
    [Expand]Getting Started
    [Expand]Providing Data
    [Expand]Appearance Customization
    [Expand]End-User Features
    [Expand]Design-Time Features
    [Collapse]Visual Elements
      Chart Area
      Chart Title
      Secondary Axis
      Axis Title
      Axis Labels
      Custom Axis Label
      Axis Tickmarks
      Constant Line
      Constant Line Title
      Grid Lines
      Series Point
      Series Point Marker
      Series Point Label
      Series Title
      Legend Marker
      Legend Check Box
      Trend Lines
      Regression Lines
      Moving Average and Envelope
      Fibonacci Indicators
      Oscillator Indicators
      Price Indicators
      Error Bars
      Scale Breaks
      Total Labels
    [Expand]Additional Resources
   [Expand]Chart3D Control
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Custom Axis Label

The DXCharts Suite provides two types of axis labels: default and custom. In addition, axis labels support an algorithm that prevents label overlapping during resizing.

This document consists of the following sections.

Expanded Custom Axis Labels

Custom Axis Labels can be used to display custom text along an axis. If custom labels are provided for an axis, its automatically generated default labels are not displayed by default.


It is possible to display default labels with custom labels. To do this, set the Axis2D.LabelVisibilityMode property to AxisLabelVisibilityMode.AutoGeneratedAndCustom.

The table below lists the main properties that affect element appearance and functionality.

Availability Axis2D.CustomLabels
Appearance System.Windows.Controls.Control.Foreground, System.Windows.Controls.Control.FontFamily, System.Windows.Controls.Control.FontSize, System.Windows.Controls.Control.FontWeight, System.Windows.Controls.Control.FontStyle, System.Windows.Controls.Control.FontStretch, ChartTextElement.ElementTemplate
Position CustomAxisLabel.Value
Contents CustomAxisLabel.Content
Visibility CustomAxisLabel.Visible


Expanded Resolve Overlapping for Axis Labels

There are situations when axis labels don't have enough space to represent all the information, for example, of a series argument.

The resolve overlapping algorithm allows you to accomplish this task for axis labels.

Note that you don't need to write any lines of code to provide this feature, because all the necessary options (axis labels rotating, staggering and hiding during chart's resizing) are enabled, by default.

You can use the properties of the AxisLabelResolveOverlappingOptions object to customize the way resolve overlapping is provided for axis labels. This object can be accessed via the Axis2D.ResolveOverlappingOptions attached property.

The following XAML demonstrates how it can be done:

To customize the resolve overlapping algorithm, you can use the following properties:

Member Description
AxisLabelResolveOverlappingOptions.AllowHide Gets or sets a value indicating whether or not to hide axis labels when resolving any overlap.
AxisLabelResolveOverlappingOptions.AllowRotate Gets or sets a value indicating whether or not to rotate axis labels when resolving overlapping labels.
AxisLabelResolveOverlappingOptions.AllowStagger Gets or sets a value indicating whether or not to stagger axis labels when resolving overlapping labels.
AxisLabelResolveOverlappingOptions.MinIndent Gets or sets the minimum indent between adjacent axis labels, when an overlap resolution algorithm is applied to them.

Is this topic helpful?​​​​​​​