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

Defines the fluent interface for configuring the PlotArea.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class PlotAreaBuilder

Inheritance: objectPlotAreaBuilder

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

C#
public PlotAreaBuilder(PlotArea plotArea)
Parameters:plotAreaPlotArea

The plot area.

Methods

Sets the Plot area background color

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

The background color.

Returns:

PlotAreaBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.PlotArea(plotArea => plotArea.Background("Red"))
)

Configures the plot area border

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

The border configuration action

Returns:

PlotAreaBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.PlotArea(plotArea =&gt; plotArea.Border(border =&gt; border.Width(2).Color("orange")))
)

Sets the Plot area border

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

The border width.

colorstring

The border color (CSS syntax).

dashTypeChartDashType

The border dash type.

Returns:

PlotAreaBuilder

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

Sets the Plot area margin

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

The plot area top margin.

rightint

The plot area right margin.

bottomint

The plot area bottom margin.

leftint

The plot area left margin.

Returns:

PlotAreaBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.PlotArea(plotArea =&gt; plotArea.Margin(0, 5, 5, 0))
)

Sets the Plot area margin

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

The plot area margin.

Returns:

PlotAreaBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.PlotArea(plotArea =&gt; plotArea.Margin(5))
)

Sets the plot area opacity.

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

The plot area opacity in the range from 0 (transparent) to 1 (opaque). The default value is 1.

Returns:

PlotAreaBuilder

Example:
C#
@(Html.Kendo().Chart(Model)
.Name("Chart")
.PlotArea(p =&gt; p.Background("green").Opacity(0.5))
)