How to add multiple Chart titles in WinForms?
The WinForms Chart control supports multiple titles. Add multiple titles at design time via the ChartControl’s Titles property (opens the Titles Collection Editor to add, remove, and customize) or at runtime using the ChartTitle class. Each title can be positioned, ordered, and styled independently.
this.chartControl1 = new ChartControl();
. . .
// Specifying Chart Title
ChartTitle title1 = new ChartTitle();
title1.Text = "Sales Dashboard";
title1.Position = ChartDock.Top;
ChartTitle title2 = new ChartTitle();
title2.Text = "2025";
title2.Position = ChartDock.Top;
// Adding into Chart control
this.chartControl1.Titles.Add(title1);
this.chartControl1.Titles.Add(title2);
Me.ChartControl1 = New ChartControl()
. . .
' Specifying Chart Title
Dim title1 As ChartTitle = New ChartTitle()
title1.Text = "Sales Dashboard"
title1.Position = ChartDock.Top
Dim title2 As ChartTitle = New ChartTitle()
title2.Text = "2025"
title2.Position = ChartDock.Top
' Adding into Chart Control
Me.ChartControl1.Titles.Add(title1)
Me.ChartControl1.Titles.Add(title2)
Output
To display the border of the title, the ShowBorder property is used. The border's forecolor, dash style, and width can also be modified.
// Customizing Title
this.chartControl1.Titles[1].Alignment = ChartAlignment.Center;
this.chartControl1.Titles[1].BackColor = Color.AliceBlue;
this.chartControl1.Titles[1].ForeColor = Color.Crimson;
this.chartControl1.Titles[1].ShowBorder = true;
this.chartControl1.Titles[1].Border.ForeColor = Color.DarkGray;
this.chartControl1.Titles[1].Border.DashStyle = DashStyle.Solid;
this.chartControl1.Titles[1].Border.Width = 1f;
this.chartControl1.Titles[1].Font = new Font("Segoe UI", 12.0f, FontStyle.Italic);
' Customizing Title
Me.ChartControl1.Titles(1).Alignment = ChartAlignment.Center
Me.ChartControl1.Titles(1).BackColor = Color.AliceBlue
Me.ChartControl1.Titles(1).ForeColor = Color.Crimson
Me.ChartControl1.Titles(1).ShowBorder = True
Me.ChartControl1.Titles(1).Border.ForeColor = Color.DarkGray
Me.ChartControl1.Titles(1).Border.DashStyle = DashStyle.Solid
Me.ChartControl1.Titles(1).Border.Width = 1.0F
Me.ChartControl1.Titles(1).Font = New Font("Segoe UI", 12.0F, FontStyle.Italic)Output
Conclusion
I hope you enjoyed learning about how to add multiple Chart titles in WinForms Chart Control.
You can refer to our WinForms Chart feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started with configuration specifications. You can also explore our WinForms Chart examples to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!