New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent interface for configuring the ChartTitle.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class ChartTitleBuilder

Inheritance: objectChartTitleBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the ChartTitleBuilder class.

C#
public ChartTitleBuilder(ChartTitle chartTitle)
Parameters:chartTitleChartTitle

The chart title.

Methods

Sets the title alignment

C#
public ChartTitleBuilder Align(ChartTextAlignment align)
Parameters:alignChartTextAlignment

The title alignment.

Returns:

ChartTitleBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.Title(title => title.Align(ChartTextAlignment.Left))
)

Sets the title background color

C#
public ChartTitleBuilder Background(string background)
Parameters:backgroundstring

The background color.

Returns:

ChartTitleBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.Title(title => title.Background("red"))
)

Configures the plot area border

C#
public ChartTitleBuilder Border(Action<ChartBorderBuilder> configurator)
Parameters:configuratorAction<ChartBorderBuilder>

The border configuration action

Returns:

ChartTitleBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.Title(title =&gt; title.Border(border =&gt; border.Width(2).Color("gray")))
)

Sets the title border

C#
public ChartTitleBuilder Border(int width, string color, ChartDashType dashType)
Parameters:widthint

The title border width.

colorstring

The title border color.

dashTypeChartDashType

The title dash type.

Returns:

ChartTitleBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.Title(title =&gt; title.Border(1, "#000", ChartDashType.Dot))
)

Sets the title color

C#
public ChartTitleBuilder Color(string color)
Parameters:colorstring

The title color (CSS format).

Returns:

ChartTitleBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.Title(title =&gt; title.Color("#ff0000").Text("Title"))
)

The accessible description of the Chart. The description is announced by screen readers when the Chart is focused.

C#
public ChartTitleBuilder Description(string value)
Parameters:valuestring

The value for Description

Returns:

ChartTitleBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.Title(title =&gt; title.Description("content"))
)

Sets the title font

C#
public ChartTitleBuilder Font(string font)
Parameters:fontstring

The title font (CSS format).

Returns:

ChartTitleBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.Title(title =&gt; title.Font("16px Arial,Helvetica,sans-serif"))
)

Sets the title margin

C#
public ChartTitleBuilder Margin(int top, int right, int bottom, int left)
Parameters:topint

The title top margin.

rightint

The title right margin.

bottomint

The title bottom margin.

leftint

The title left margin.

Returns:

ChartTitleBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.Title(title =&gt; title.Margin(20))
)

Sets the title margin

C#
public ChartTitleBuilder Margin(int margin)
Parameters:marginint

The title margin.

Returns:

ChartTitleBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.Title(title =&gt; title.Margin(20))
)

Sets the title padding

C#
public ChartTitleBuilder Padding(int top, int right, int bottom, int left)
Parameters:topint

The title top padding.

rightint

The title right padding.

bottomint

The title bottom padding.

leftint

The title left padding.

Returns:

ChartTitleBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.Title(title =&gt; title.Padding(20))
)

Sets the title padding

C#
public ChartTitleBuilder Padding(int padding)
Parameters:paddingint

The title padding.

Returns:

ChartTitleBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.Title(title =&gt; title.Padding(20))
)

Sets the title position

C#
public ChartTitleBuilder Position(ChartTitlePosition position)
Parameters:positionChartTitlePosition

The title position.

Returns:

ChartTitleBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.Title(title =&gt; title.Position(ChartTitlePosition.Bottom))
)

Sets the title text

C#
public ChartTitleBuilder Text(string text)
Parameters:textstring

The text title.

Returns:

ChartTitleBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.Title(title =&gt; title.Text("Chart"))
)

Sets the title visibility

C#
public ChartTitleBuilder Visible(bool visible)
Parameters:visiblebool

The title visibility.

Returns:

ChartTitleBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.Title(title =&gt; title.Visible(false))
)