Back to Devexpress

LegendBase.Title Property

corelibraries-devexpress-dot-xtracharts-dot-legendbase-36d32abf.md

latest2.8 KB
Original Source

LegendBase.Title Property

Returns the legend title settings.

Namespace : DevExpress.XtraCharts

Assembly : DevExpress.XtraCharts.v25.2.dll

NuGet Package : DevExpress.Charts

Declaration

csharp
[PersistenceMode(PersistenceMode.InnerProperty)]
[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
public LegendTitle Title { get; }
vb
<XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)>
<PersistenceMode(PersistenceMode.InnerProperty)>
Public ReadOnly Property Title As LegendTitle

Property Value

TypeDescription
LegendTitle

A LegendTitle object which provides the legend title settings.

|

Remarks

For more information, refer to the Legend Title topic.

Example

To display the legend title, set the TitleBase.Visible property of the LegendBase.Title to true and specify the Title.Text of the LegendBase.Title. To customize the appearance of the title, you can change, for example, the AlignedTitle.Alignment, AlignedTitle.WordWrap and AlignedTitle.MaxLineCount properties to align the title to the left and divide it into several lines.

csharp
// Specify legend title's text.
chart.Legend.Title.Text = "Area of countries";
// Show legend title.
chart.Legend.Title.Visible = true;
// Configure legend title appearance.
chart.Legend.Title.Alignment = StringAlignment.Near;
chart.Legend.Title.MaxLineCount = 3;
chart.Legend.Title.WordWrap = true;
vb
' Specify legend title's text.
chart.Legend.Title.Text = "Area of countries"
' Show legend title.
chart.Legend.Title.Visible = True
' Configure legend title appearance.
chart.Legend.Title.Alignment = StringAlignment.Near
chart.Legend.Title.MaxLineCount = 3
chart.Legend.Title.WordWrap = True

See Also

LegendBase Class

LegendBase Members

DevExpress.XtraCharts Namespace