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

PlotAreaBuilder

Methods

Background(System.String)

Sets the Plot area background color

Parameters

background - System.String

The background color.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .PlotArea(plotArea => plotArea.Background("Red"))
            )

Margin(System.Int32,System.Int32,System.Int32,System.Int32)

Sets the Plot area margin

Parameters

top - System.Int32

The plot area top margin.

right - System.Int32

The plot area right margin.

bottom - System.Int32

The plot area bottom margin.

left - System.Int32

The plot area left margin.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .PlotArea(plotArea => plotArea.Margin(0, 5, 5, 0))
            )

Margin(System.Int32)

Sets the Plot area margin

Parameters

margin - System.Int32

The plot area margin.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .PlotArea(plotArea => plotArea.Margin(5))
            )

Border(System.Int32,System.String,Kendo.Mvc.UI.ChartDashType)

Sets the Plot area border

Parameters

width - System.Int32

The border width.

color - System.String

The border color (CSS syntax).

dashType - ChartDashType

The border dash type.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .PlotArea(plotArea => plotArea.Border(1, "#000", ChartDashType.Dot))
            )

Border(System.Action)

Configures the plot area border

Parameters

configurator - System.Action<ChartBorderBuilder>

The border configuration action

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .PlotArea(plotArea => plotArea.Border(border => border.Width(2).Color("orange")))
            )

Opacity(System.Double)

Sets the plot area opacity.

Parameters

opacity - System.Double

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

Example


            @(Html.Kendo().Chart(Model)
                       .Name("Chart")
                       .PlotArea(p => p.Background("green").Opacity(0.5))
            )

In this article
Not finding the help you need?