Skip to main content

ChartTitleDockStyle Enum

Lists the values used to specify the edge of the chart control which a title is docked to.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v24.1.dll

NuGet Package: DevExpress.Charts

Declaration

[ResourceFinder(typeof(XtraChartsResFinder), "PropertyNamesRes")]
[TypeConverter(typeof(EnumTypeConverter))]
public enum ChartTitleDockStyle

Members

Name Description
Top

A title is positioned at the top of the chart control.

Bottom

A title is positioned at the bottom of the chart control.

Left

A title is positioned to the left of the chart control.

Right

A title is positioned to the right of the chart control.

Related API Members

The following properties accept/return ChartTitleDockStyle values:

Library Related API Members
Cross-Platform Class Library DockableTitle.Dock
WinForms Controls DockableTitleModel.Dock

Remarks

The values listed by this enumeration are used to set the DockableTitle.Dock property.

For more information, refer to Chart Titles.

Example

This example demonstrates how chart titles can be accessed and customized at runtime.

// Create chart titles.
ChartTitle chartTitle1 = new ChartTitle();
ChartTitle chartTitle2 = new ChartTitle();

// Define the text for the titles.
chartTitle1.Text = "<i>Basic</i> <b>HTML</b> <u>is</u> <color=blue>supported</color>.";
chartTitle2.Text = "The capability to word-wrap is available for chart titles.";

chartTitle2.WordWrap = true;
chartTitle2.MaxLineCount = 2;

// Define the alignment of the titles.
chartTitle1.Alignment = StringAlignment.Center;
chartTitle2.Alignment = StringAlignment.Near;

// Place the titles where it's required.
chartTitle1.Dock = ChartTitleDockStyle.Top;
chartTitle2.Dock = ChartTitleDockStyle.Bottom;

// Customize a title's appearance.
chartTitle1.Antialiasing = true;
chartTitle1.Font = new Font("Tahoma", 14, FontStyle.Bold);
chartTitle1.TextColor = Color.Red;
chartTitle1.Indent = 10;

// Add the titles to the chart.
chartControl1.Titles.AddRange(new ChartTitle[] {
chartTitle1,
chartTitle2});
See Also