Back to Devexpress

Series Titles

wpf-7941-controls-and-libraries-charts-suite-chart-control-series-series-titles.md

latest4.1 KB
Original Source

Series Titles

  • Aug 24, 2023
  • 2 minutes to read

A series title provides additional information on a series. Only the Pie, Donut, Nested Donut and Funnel series can be displayed with a title. You can add an unlimited number of titles to these series. Note that a chart can have common titles. Refer to the Chart Titles topic to learn more.

This document consists of the following sections:

Note

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.

How to Add a Title to a Series

The following markup shows how to add a title to the bottom of a Pie series:

xaml
<dxc:PieSeries2D>
    <!-- ... -->
    <dxc:PieSeries2D.Titles>
        <dxc:Title Content="North America" 
               HorizontalAlignment="Center" 
               Dock="Bottom"/>        
    </dxc:PieSeries2D.Titles>
</dxc:PieSeries2D>

The table lists classes and properties that are used in the example above:

Class or PropertyDescription
PieSeries.TitlesThe series titles’ collection.
TitleAn individual title.
TitleBase.ContentSpeicifies title’s content.
TitleBase.HorizontalAlignmentSets the title’s horizontal alignment.
TitleBase.VerticalAlignmentSets the title’s vertical alignment.
Title.DockSpecifies the title position relative to a series.

How to Customize a Series Title’s Appearance

Use the following properties to modify the series title’s appearance:

  • Assign a DataTemplate object to the TitleBase.ContentTemplate property to modify series title content’s appearance.
  • Use the common appearance settings to customize a series title’s text: the Foreground , FontFamily , FontSize , FontStretch , FontStyle and FontWeight properties are inherited from the Control class.

See Also

Series Point Labels

Axis Titles

Chart Titles