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

Defines the fluent API for configuring ChartTitleSettings

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

C#
public class ChartTitleSettingsBuilder<T> where T : class

Inheritance: objectChartTitleSettingsBuilder<T>

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 ChartTitleSettingsBuilder<T> class.

C#
public ChartTitleSettingsBuilder(ChartTitleSettings<T> container)
Parameters:containerChartTitleSettings<T>

The ChartTitleSettings<T> container

Properties

Gets the ChartTitleSettings<T> container.

C#
protected ChartTitleSettings<T> Container { get; }

Methods

Specifies the text alignment.

C#
public ChartTitleSettingsBuilder<T> Align(ChartTextAlignment value)
Parameters:valueChartTextAlignment

The value for Align

Returns:

ChartTitleSettingsBuilder<T>

Returns the current ChartTitleSettingsBuilder<T> instance.

The background color of the title. Accepts a valid CSS color string, including hex and rgb.

C#
public ChartTitleSettingsBuilder<T> Background(string value)
Parameters:valuestring

The value for Background

Returns:

ChartTitleSettingsBuilder<T>

Returns the current ChartTitleSettingsBuilder<T> instance.

The border of the title.

C#
public ChartTitleSettingsBuilder<T> Border(Action<ChartTitleBorderSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartTitleBorderSettingsBuilder<T>>

The ChartTitleBorderSettingsBuilder<T> for the border setting.

Returns:

ChartTitleSettingsBuilder<T>

Returns the current instance of ChartTitleSettingsBuilder<T> .

Sets the title border

C#
public ChartTitleSettingsBuilder<T> Border(int width, string color, ChartDashType dashType)
Parameters:widthint

The title border width.

colorstring

The title border color.

dashTypeChartDashType

The title dash type.

Returns:

ChartTitleSettingsBuilder<T>

Returns the current instance of ChartTitleSettingsBuilder<T> .

Example:
C#
@(Html.Kendo().Chart()
.Name("chart")
.Title(title =&gt; title.Text("2018 Sales").Border(1, "#f00", DashType.Dot))
)

The text color of the title. Accepts a valid CSS color string, including hex and rgb.

C#
public ChartTitleSettingsBuilder<T> Color(string value)
Parameters:valuestring

The value for Color

Returns:

ChartTitleSettingsBuilder<T>

Returns the current ChartTitleSettingsBuilder<T> instance.

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

C#
public ChartTitleSettingsBuilder<T> Description(string value)
Parameters:valuestring

The value for Description

Returns:

ChartTitleSettingsBuilder<T>

Returns the current ChartTitleSettingsBuilder<T> instance.

The font of the title.

C#
public ChartTitleSettingsBuilder<T> Font(string value)
Parameters:valuestring

The value for Font

Returns:

ChartTitleSettingsBuilder<T>

Returns the current ChartTitleSettingsBuilder<T> instance.

The margin of the title. A numeric value will set all margins.

C#
public ChartTitleSettingsBuilder<T> Margin(Action<ChartTitleMarginSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartTitleMarginSettingsBuilder<T>>

The ChartTitleMarginSettingsBuilder<T> for the margin setting.

Returns:

ChartTitleSettingsBuilder<T>

Returns the current instance of ChartTitleSettingsBuilder<T> .

Sets the title margin

C#
public ChartTitleSettingsBuilder<T> 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:

ChartTitleSettingsBuilder<T>

Returns the current instance of ChartTitleSettingsBuilder<T> .

Example:
C#
@(Html.Kendo().Chart()
.Name("chart")
.Title(title =&gt; title.Text("2018 Sales").Margin(10, 20, 10, 10))
)

Sets the title margin

C#
public ChartTitleSettingsBuilder<T> Margin(int margin)
Parameters:marginint

The title margin.

Returns:

ChartTitleSettingsBuilder<T>

Returns the current instance of ChartTitleSettingsBuilder<T> .

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

The padding of the title. A numeric value will set all margins.

C#
public ChartTitleSettingsBuilder<T> Padding(Action<ChartTitlePaddingSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartTitlePaddingSettingsBuilder<T>>

The ChartTitlePaddingSettingsBuilder<T> for the padding setting.

Returns:

ChartTitleSettingsBuilder<T>

Returns the current instance of ChartTitleSettingsBuilder<T> .

Sets the title padding

C#
public ChartTitleSettingsBuilder<T> 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:

ChartTitleSettingsBuilder<T>

Returns the current instance of ChartTitleSettingsBuilder<T> .

Example:
C#
@(Html.Kendo().Chart()
.Name("chart")
.Title(title =&gt; title.Text("2018 Sales").Padding(10, 20, 10, 10))
)

Sets the title padding

C#
public ChartTitleSettingsBuilder<T> Padding(int padding)
Parameters:paddingint

The title padding.

Returns:

ChartTitleSettingsBuilder<T>

Returns the current instance of ChartTitleSettingsBuilder<T> .

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

Specifies the title position.

C#
public ChartTitleSettingsBuilder<T> Position(ChartTitlePosition value)
Parameters:valueChartTitlePosition

The value for Position

Returns:

ChartTitleSettingsBuilder<T>

Returns the current ChartTitleSettingsBuilder<T> instance.

The text of the chart title. You can also set the text directly for a title with default options.

C#
public ChartTitleSettingsBuilder<T> Text(string value)
Parameters:valuestring

The value for Text

Returns:

ChartTitleSettingsBuilder<T>

Returns the current ChartTitleSettingsBuilder<T> instance.

If set to true the chart will display the title. By default the title will be displayed.

C#
public ChartTitleSettingsBuilder<T> Visible(bool value)
Parameters:valuebool

The value for Visible

Returns:

ChartTitleSettingsBuilder<T>

Returns the current ChartTitleSettingsBuilder<T> instance.