Title and Subtitle
The Telerik UI for ASP.NET MVC 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"
@(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 MVC Chart supports configuring an additional subtitle by using the subtitle
option.
The following example demonstrates how to configure a subtitle:
@(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
:
Align
Color
Background
Border
Font
Padding
@(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.
)