[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Collapse]Chart Control
   [Expand]Getting Started
   [Expand]Charting Basics
   [Expand]Series Views
   [Collapse]Chart Elements
     Chart Titles
   [Expand]Providing Data
   [Expand]Data Representation
   [Expand]Appearance Customization
   [Expand]End-User Features
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]Additional Resources
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Chart Titles

This document describes how chart titles can be created and customized, and illustrates their general functionality.

Chart titles allow you to accompany your chart with text headers and explanations with HTML support, and no limitations on the size and quantity of titles.

Note that if a chart title's length exceeds the size of the chart, you can force the title's text to be wrapped in multiple lines using the AlignedTitle.WordWrap property.

To access the chart title collection at design time, select the chart control, and in the Properties window, locate the ChartControl.Titles property. Click its ellipsis button, and the Chart Title Collection Editor will appear.

In this dialog, use the Add button to create chart titles. After a title is created, you can customize its appearance and behavior using the available properties briefly described below.

  • A title's text is determined by the Title.Text property. You can apply HTML formatting to your chart's titles, by using standard HTML tags. To learn more on HTML support, refer to HTML Text Formatting.
  • The appearance of title text can be customized with the TitleBase.Font, TitleBase.Antialiasing and TitleBase.TextColor properties. Note that the color defined with title HTML tags <color></color> has priority over the title's TitleBase.TextColor property's setting.
  • Placement of titles within a chart is determined by their AlignedTitle.Alignment and DockableTitle.Dock properties.
  • To define the spacing around a title (in pixels), define its DockableTitle.Indent property.
  • To enable automatic word wrapping for lengthy chart titles, use the AlignedTitle.WordWrap property.

    After you enable this property, the AlignedTitle.MaxLineCount property comes into effect, which allows you to determine the limit for new lines appearing when a title's text is wrapped. Note that if a title's length exceeds this limit, the last line of text will be cut off by an ellipsis.

    If required, you can set the AlignedTitle.MaxLineCount property to 0, which will wrap title completely.

  • To hide a title while maintaining it in the collection, disable its TitleBase.Visible property.

The Chart Control can hide its elements if there is insufficient space to display them. Elements are hidden in the following order:

  1. Legends
  2. Axis Titles
  3. Series Titles
  4. Pane Titles
  5. Axes
  6. Chart Title
  7. Breadcrumbs

To make the Chart Control always display its elements, disable the ChartControl.AutoLayout property.

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