Skip to main content

ChartTitle() Constructor

Initializes a new instance of the ChartTitle class with the default settings.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v23.2.dll

NuGet Package: DevExpress.Charts

Declaration

public ChartTitle()

Remarks

In this case the DockableTitle.Dock property will be set to ChartTitleDockStyle.Top.

Example

This example demonstrates how word-wrapping can be enabled for chart titles at runtime. In addition, you can determine the maximum number of lines in which a title is allowed to wrap.

// Create a title and add it to the chart's collection.
ChartTitle chartTitle1 = new ChartTitle();
ChartControl1.Titles.Add(chartTitle1);
chartTitle1.Text = "Just a Very Lengthy Title for Such a Small Chart";

// Enable word-wrapping for the title,
// and define a limit for its lines.
chartTitle1.WordWrap = true;
chartTitle1.MaxLineCount = 2;
See Also