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

ChartAreaBuilder

Methods

Background(System.String)

Sets the chart area background color.

Parameters

background - System.String

The background color.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .ChartArea(chartArea => chartArea.Background("Red"))
            )

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

Sets the chart area margin.

Parameters

top - System.Int32

The chart area top margin.

right - System.Int32

The chart area right margin.

bottom - System.Int32

The chart area bottom margin.

left - System.Int32

The chart area left margin.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .ChartArea(chartArea => chartArea.Margin(0, 5, 5, 0))
            )

Margin(System.Int32)

Sets the chart area margin.

Parameters

margin - System.Int32

The chart area margin.

Example


            @(Html.Kendo().Chart()
                      .Name("Chart")
                      .ChartArea(chartArea => chartArea.Margin(5))
            )

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

Sets the chart 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")
                       .ChartArea(chartArea => chartArea.Border(1, "#000", ChartDashType.Dot))
            )

Border(System.Action)

Configures the plot area border

Parameters

configurator - System.Action<ChartBorderBuilder>

Example


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

Height(System.Int32)

Sets the height of the chart area.

Parameters

height - System.Int32

The chart area height.

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .ChartArea(chartArea => chartArea.Height(200))
            )

Width(System.Int32)

Sets the width of the chart area.

Parameters

width - System.Int32

The chart area width.

Example


            @(Html.Kendo().Chart()
                       .Name("Chart")
                       .ChartArea(chartArea => chartArea.Width(600))
            )

In this article
Not finding the help you need?