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

Defines the fluent interface for configuring plot band.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class ChartPlotBandsBuilder

Inheritance: objectChartPlotBandsBuilder

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

C#
public ChartPlotBandsBuilder(ChartPlotBand item)
Parameters:itemChartPlotBand

The plot band.

Methods

Sets the plot band background color

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

The plot band background color.

Returns:

ChartPlotBandsBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.CategoryAxis(axis => axis
.PlotBands(plotBands => plotBands
.Add().Color("Red")
)
)
)

Sets the plot band start position.

C#
public ChartPlotBandsBuilder From(object from)
Parameters:fromobject

The plot band start position.

Returns:

ChartPlotBandsBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.CategoryAxis(axis => axis
.PlotBands(plotBands => plotBands
.Add().From(1).Color("Red")
)
)
)

The label configuration of the plotband.

C#
public ChartPlotBandsBuilder Label(Action<ChartPlotBandLabelBuilder> configurator)
Parameters:configuratorAction<ChartPlotBandLabelBuilder>

The configurator for the label setting.

Returns:

ChartPlotBandsBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.ValueAxis(axis =&gt; axis.Numeric()
.PlotBands(bands =&gt;
{
bands.Add().From(10000).To(30000).Label(label =&gt; label.Visible(false));
})
)
)

Sets the plot band opacity

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

The plot band opacity.

Returns:

ChartPlotBandsBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.CategoryAxis(axis =&gt; axis
.PlotBands(plotBands =&gt; plotBands
.Add().Opacity(0.5)
)
)
)

Sets the plot band end position.

C#
public ChartPlotBandsBuilder To(object to)
Parameters:toobject

The plot band end position.

Returns:

ChartPlotBandsBuilder

Example:
C#
@(Html.Kendo().Chart()
.Name("Chart")
.CategoryAxis(axis =&gt; axis
.PlotBands(plotBands =&gt; plotBands
.Add().To(2).Color("Red")
)
)
)