New to Telerik UI for ASP.NET Core? Start a free 30-day trial
Title and Subtitle
Updated over 6 months ago
The Telerik UI for ASP.NET Core Chart supports options for configuring the appearance of its title and subtitle.
Setting the Title
The Title property of the Chart accepts a string or a Lambda expression as its parameter. To control the position of the title, use the following available Position options of the Title property:
"Top""Bottom"
Razor
@(Html.Kendo().Chart()
.Name("chart")
.Title(title => title.Position(ChartTitlePosition.Top).Text("Site Visitors Stats"))
// Other options.
)Setting the Subtitle
The Telerik UI for ASP.NET Core Chart supports configuring an additional subtitle by setting the subtitle option.
The following example demonstrates how to configure a subtitle:
Razor
@(Html.Kendo().Chart()
.Name("chart")
.Title(title => title.Position(ChartTitlePosition.Top).Text("Site Visitors Stats"))
.Subtitle(subtitle => subtitle.Text("/thousands/"))
// Other options.
)Customizing the Appearance
The Chart supports the following properties which enable you to customize the appearance of its Title:
AlignColorBackgroundBorderFontPadding
Razor
@(Html.Kendo().Chart()
.Name("chart")
.Title(t=>t.Text("Site Visitors Stats").Align(ChartTextAlignment.Left).Color("green").Background("grey").Border(1,"green",ChartDashType.Solid).Font("Comic Sans").Padding(30))
// Other options.
)