ChartAreaBuilder
Methods
Background(System.String)
Sets the background color of the Chart area. The option accepts a valid CSS color string, including HEX and RGB.
Parameters
background - System.String
The value that configures the background color.
Example
@(Html.Kendo().Chart()
.Name("Chart")
.ChartArea(chartArea => chartArea.Background("#aa00bb"))
)
Margin(System.Int32,System.Int32,System.Int32,System.Int32)
Sets the margin of the Chart area.
Parameters
top - System.Int32
The value that sets the top margin.
right - System.Int32
The value that sets the right margin.
bottom - System.Int32
The value that sets the bottom margin.
left - System.Int32
TThe value that sets the left margin.
Example
@(Html.Kendo().Chart()
.Name("Chart")
.ChartArea(chartArea => chartArea.Margin(0, 5, 5, 0))
)
Margin(System.Int32)
Sets the margin of the Chart area. The specified value will be applied to all margins.
Parameters
margin - System.Int32
The value that configures the margins.
Example
@(Html.Kendo().Chart()
.Name("Chart")
.ChartArea(chartArea => chartArea.Margin(5))
)
Border(System.Int32,System.String,Kendo.Mvc.UI.ChartDashType)
Sets the border of the Chart area.
Parameters
width - System.Int32
The border width in pixels.
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 border settings of the Chart area.
Parameters
configurator - System.Action<ChartBorderBuilder>
The action that configures the border options.
Example
@(Html.Kendo().Chart()
.Name("Chart")
.ChartArea(chartArea => chartArea.Border(border=>border.Width(2).Color("green")))
)
Height(System.Int32)
Sets the height of the Chart area. The default height is 400px.
Parameters
height - System.Int32
The value that configures the height.
Example
@(Html.Kendo().Chart()
.Name("Chart")
.ChartArea(chartArea => chartArea.Height(200))
)
Width(System.Int32)
Sets the width of the Chart area. The default width is 600px.
Parameters
width - System.Int32
The value that configures the width.
Example
@(Html.Kendo().Chart()
.Name("Chart")
.ChartArea(chartArea => chartArea.Width(600))
)