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

Defines the fluent interface for configuring ChartElementBorder.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class ChartBorderBuilder

Inheritance: objectChartBorderBuilder

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 ChartBorderBuilder class.

C#
public ChartBorderBuilder(ChartElementBorder chartBorder)
Parameters:chartBorderChartElementBorder

The chart border.

Methods

Sets the border color of the chart area.

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

The border color (CSS format).

Returns:

ChartBorderBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.ChartArea(chartArea => chartArea.Border(border => border.Color("#f00")))
)

Sets the border dash type of the chart area.

C#
public ChartBorderBuilder DashType(ChartDashType dashType)
Parameters:dashTypeChartDashType

The enum value that sets the dash type.

Returns:

ChartBorderBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.ChartArea(chartArea => chartArea.Border(border => border.DashType(ChartDashType.Dot)))
)

Sets the border opacity of the chart area.

C#
public ChartBorderBuilder Opacity(double opacity)
Parameters:opacitydouble

The border opacity (CSS format).

Returns:

ChartBorderBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.ChartArea(chartArea => chartArea.Border(border => border.Opacity(0.2)))
)

Sets the width of the border in pixels. By default, the border does not appear.

C#
public ChartBorderBuilder Width(int width)
Parameters:widthint

The border width.

Returns:

ChartBorderBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.ChartArea(chartArea => chartArea.Border(border => border.Width(2)))
)