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

Defines the fluent API for configuring ChartSeriesLabelsSettings

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

T

Syntax:

C#
public class ChartSeriesLabelsSettingsBuilder<T> where T : class

Inheritance: objectChartSeriesLabelsSettingsBuilder<T>

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 ChartSeriesLabelsSettingsBuilder<T> class.

C#
public ChartSeriesLabelsSettingsBuilder(ChartSeriesLabelsSettings<T> container)
Parameters:containerChartSeriesLabelsSettings<T>

The ChartSeriesLabelsSettings<T> container

Properties

Gets the ChartSeriesLabelsSettings<T> container.

C#
protected ChartSeriesLabelsSettings<T> Container { get; }

Methods

Specifies the alignment of the labels.

C#
public ChartSeriesLabelsSettingsBuilder<T> Align(ChartSeriesLabelsAlign value)
Parameters:valueChartSeriesLabelsAlign

The value for Align

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The template which renders the ARIA label for the series labels.The fields which can be used in the template are: category - the category name. Available for area, bar, column, bubble, donut, line and pie series.; dataItem - the original data item used to construct the point. Will be null if binding to array.; percentage - the point value represented as a percentage value. Available only for 100% stacked charts.; series - the data series or value - the point value. Can be a number or object containing each bound field..

C#
public ChartSeriesLabelsSettingsBuilder<T> AriaTemplate(string value)
Parameters:valuestring

The value for AriaTemplate

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The template which renders the ARIA label for the series labels.The fields which can be used in the template are: category - the category name. Available for area, bar, column, bubble, donut, line and pie series.; dataItem - the original data item used to construct the point. Will be null if binding to array.; percentage - the point value represented as a percentage value. Available only for 100% stacked charts.; series - the data series or value - the point value. Can be a number or object containing each bound field..

C#
public ChartSeriesLabelsSettingsBuilder<T> AriaTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the ariatemplate.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The template which renders the ARIA label for the series labels.The fields which can be used in the template are: category - the category name. Available for area, bar, column, bubble, donut, line and pie series.; dataItem - the original data item used to construct the point. Will be null if binding to array.; percentage - the point value represented as a percentage value. Available only for 100% stacked charts.; series - the data series or value - the point value. Can be a number or object containing each bound field..

C#
public ChartSeriesLabelsSettingsBuilder<T> AriaTemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for AriaTemplate

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The template which renders the ARIA label for the series labels.The fields which can be used in the template are: category - the category name. Available for area, bar, column, bubble, donut, line and pie series.; dataItem - the original data item used to construct the point. Will be null if binding to array.; percentage - the point value represented as a percentage value. Available only for 100% stacked charts.; series - the data series or value - the point value. Can be a number or object containing each bound field..

C#
public ChartSeriesLabelsSettingsBuilder<T> AriaTemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for AriaTemplate

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The template which renders the ARIA label for the series labels.The fields which can be used in the template are: category - the category name. Available for area, bar, column, bubble, donut, line and pie series.; dataItem - the original data item used to construct the point. Will be null if binding to array.; percentage - the point value represented as a percentage value. Available only for 100% stacked charts.; series - the data series or value - the point value. Can be a number or object containing each bound field..

C#
public ChartSeriesLabelsSettingsBuilder<T> AriaTemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for AriaTemplate

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The background color of the labels. Accepts a valid CSS color string, including hex and rgb.

C#
public ChartSeriesLabelsSettingsBuilder<T> Background(string value)
Parameters:valuestring

The value for Background

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The background color of the labels. Accepts a valid CSS color string, including hex and rgb.

C#
public ChartSeriesLabelsSettingsBuilder<T> BackgroundHandler(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The background color of the labels. Accepts a valid CSS color string, including hex and rgb.

C#
public ChartSeriesLabelsSettingsBuilder<T> BackgroundHandler(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The border of the labels.

C#
public ChartSeriesLabelsSettingsBuilder<T> Border(Action<ChartSeriesLabelsBorderSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartSeriesLabelsBorderSettingsBuilder<T>>

The ChartSeriesLabelsBorderSettingsBuilder<T> for the border setting.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current instance of ChartSeriesLabelsSettingsBuilder<T> .

The text color of the labels. Accepts a valid CSS color string, including hex and rgb.

C#
public ChartSeriesLabelsSettingsBuilder<T> Color(string value)
Parameters:valuestring

The value for Color

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The text color of the labels. Accepts a valid CSS color string, including hex and rgb.

C#
public ChartSeriesLabelsSettingsBuilder<T> ColorHandler(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The text color of the labels. Accepts a valid CSS color string, including hex and rgb.

C#
public ChartSeriesLabelsSettingsBuilder<T> ColorHandler(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The distance of the labels when series.type is set to "donut" or "pie".

C#
public ChartSeriesLabelsSettingsBuilder<T> Distance(double value)
Parameters:valuedouble

The value for Distance

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The font style of the labels. Accepts a valid CSS font string, for example "20px Courier New'".

C#
public ChartSeriesLabelsSettingsBuilder<T> Font(string value)
Parameters:valuestring

The value for Font

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The font style of the labels. Accepts a valid CSS font string, for example "20px Courier New'".

C#
public ChartSeriesLabelsSettingsBuilder<T> FontHandler(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The font style of the labels. Accepts a valid CSS font string, for example "20px Courier New'".

C#
public ChartSeriesLabelsSettingsBuilder<T> FontHandler(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The format of the labels. Uses kendo.format.Format placeholders: Area, bar, column, line, pie, radarArea, radarColumn and radarLine; {0} - value; Bubble; {0} - x value; {1} - y value; {2} - size value; {3} - category name; Bullet; {0} - value; {1} - target value; Scatter, scatterLine; {0} - x value; {1} - y value; PolarArea, polarLine and polarScatter; {0} - x value (degrees); {1} - y value; Candlestick and OHLC; {0} - open value; {1} - high value; {2} - low value; {3} - close value; {4} - category name; RangeArea, rangeBar, rangeColumn; {0} - from value or {1} - to value.

C#
public ChartSeriesLabelsSettingsBuilder<T> Format(string value)
Parameters:valuestring

The value for Format

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The format of the labels. Uses kendo.format.Format placeholders: Area, bar, column, line, pie, radarArea, radarColumn and radarLine; {0} - value; Bubble; {0} - x value; {1} - y value; {2} - size value; {3} - category name; Bullet; {0} - value; {1} - target value; Scatter, scatterLine; {0} - x value; {1} - y value; PolarArea, polarLine and polarScatter; {0} - x value (degrees); {1} - y value; Candlestick and OHLC; {0} - open value; {1} - high value; {2} - low value; {3} - close value; {4} - category name; RangeArea, rangeBar, rangeColumn; {0} - from value or {1} - to value.

C#
public ChartSeriesLabelsSettingsBuilder<T> FormatHandler(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The format of the labels. Uses kendo.format.Format placeholders: Area, bar, column, line, pie, radarArea, radarColumn and radarLine; {0} - value; Bubble; {0} - x value; {1} - y value; {2} - size value; {3} - category name; Bullet; {0} - value; {1} - target value; Scatter, scatterLine; {0} - x value; {1} - y value; PolarArea, polarLine and polarScatter; {0} - x value (degrees); {1} - y value; Candlestick and OHLC; {0} - open value; {1} - high value; {2} - low value; {3} - close value; {4} - category name; RangeArea, rangeBar, rangeColumn; {0} - from value or {1} - to value.

C#
public ChartSeriesLabelsSettingsBuilder<T> FormatHandler(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The chart series from label configuration.

C#
public ChartSeriesLabelsSettingsBuilder<T> From(Action<ChartSeriesLabelsFromSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartSeriesLabelsFromSettingsBuilder<T>>

The ChartSeriesLabelsFromSettingsBuilder<T> for the from setting.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current instance of ChartSeriesLabelsSettingsBuilder<T> .

The margin of the labels. A numeric value will set all margins.

C#
public ChartSeriesLabelsSettingsBuilder<T> Margin(Action<ChartSeriesLabelsMarginSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartSeriesLabelsMarginSettingsBuilder<T>>

The ChartSeriesLabelsMarginSettingsBuilder<T> for the margin setting.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current instance of ChartSeriesLabelsSettingsBuilder<T> .

The margin of the labels.

C#
public ChartSeriesLabelsSettingsBuilder<T> Margin(int value)
Parameters:valueint

The integer value to apply as labels margin.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Example:
C#
@(Html.Kendo().Chart(Model)
.Name("Chart")
.Series(series =&gt; series
.Bar(bar =&gt; bar.Sales)
.Labels(labels =&gt; labels
.Margin(margin =&gt; margin
.Top(10)
.Right(5)
.Left(5)
.Bottom(10)
)
)
)
)

The padding of the labels. A numeric value will set all paddings.

C#
public ChartSeriesLabelsSettingsBuilder<T> Padding(Action<ChartSeriesLabelsPaddingSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartSeriesLabelsPaddingSettingsBuilder<T>>

The ChartSeriesLabelsPaddingSettingsBuilder<T> for the padding setting.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current instance of ChartSeriesLabelsSettingsBuilder<T> .

The margin of the labels.

C#
public ChartSeriesLabelsSettingsBuilder<T> Padding(int value)
Parameters:valueint

The integer value to apply as padding to the labels.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Example:
C#
@(Html.Kendo().Chart(Model)
.Name("Chart")
.Series(series =&gt; series
.Bar(bar =&gt; bar.Sales)
.Labels(labels =&gt; labels
.Padding(padding =&gt; padding
.Top(10)
.Right(5)
.Left(5)
.Bottom(10)
)
)
)
)

Specifies the position of the labels.

C#
public ChartSeriesLabelsSettingsBuilder<T> Position(ChartSeriesLabelsPosition value)
Parameters:valueChartSeriesLabelsPosition

The value for Position

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

Specifies the position of the labels.

C#
public ChartSeriesLabelsSettingsBuilder<T> PositionHandler(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

Specifies the position of the labels.

C#
public ChartSeriesLabelsSettingsBuilder<T> PositionHandler(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The rotation angle of the labels. By default, the labels are not rotated.

C#
public ChartSeriesLabelsSettingsBuilder<T> Rotation(string value)
Parameters:valuestring

The value for Rotation

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The template which renders the chart series label.The fields which can be used in the template are: category - the category name. Available for area, bar, column, bubble, donut, line, pie and waterfall series.; dataItem - the original data item used to construct the point. Will be null if binding to array.; percentage - the point value represented as a percentage value. Available only for donut, pie and 100% stacked charts.; series - the data series; stackValue - the cumulative point value on the stack. Available only for stackable series.; value - the point value. Can be a number or object containing each bound field.; runningTotal - the sum of point values since the last "runningTotal" summary point. Available for waterfall series. or total - the sum of all previous series values. Available for waterfall series..

C#
public ChartSeriesLabelsSettingsBuilder<T> Template(string value)
Parameters:valuestring

The value for Template

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The template which renders the chart series label.The fields which can be used in the template are: category - the category name. Available for area, bar, column, bubble, donut, line, pie and waterfall series.; dataItem - the original data item used to construct the point. Will be null if binding to array.; percentage - the point value represented as a percentage value. Available only for donut, pie and 100% stacked charts.; series - the data series; stackValue - the cumulative point value on the stack. Available only for stackable series.; value - the point value. Can be a number or object containing each bound field.; runningTotal - the sum of point values since the last "runningTotal" summary point. Available for waterfall series. or total - the sum of all previous series values. Available for waterfall series..

C#
public ChartSeriesLabelsSettingsBuilder<T> Template<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The template which renders the chart series label.The fields which can be used in the template are: category - the category name. Available for area, bar, column, bubble, donut, line, pie and waterfall series.; dataItem - the original data item used to construct the point. Will be null if binding to array.; percentage - the point value represented as a percentage value. Available only for donut, pie and 100% stacked charts.; series - the data series; stackValue - the cumulative point value on the stack. Available only for stackable series.; value - the point value. Can be a number or object containing each bound field.; runningTotal - the sum of point values since the last "runningTotal" summary point. Available for waterfall series. or total - the sum of all previous series values. Available for waterfall series..

C#
public ChartSeriesLabelsSettingsBuilder<T> TemplateHandler(string templateHandler)
Parameters:templateHandlerstring

The handler that returs the template for Template

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The template which renders the chart series label.The fields which can be used in the template are: category - the category name. Available for area, bar, column, bubble, donut, line, pie and waterfall series.; dataItem - the original data item used to construct the point. Will be null if binding to array.; percentage - the point value represented as a percentage value. Available only for donut, pie and 100% stacked charts.; series - the data series; stackValue - the cumulative point value on the stack. Available only for stackable series.; value - the point value. Can be a number or object containing each bound field.; runningTotal - the sum of point values since the last "runningTotal" summary point. Available for waterfall series. or total - the sum of all previous series values. Available for waterfall series..

C#
public ChartSeriesLabelsSettingsBuilder<T> TemplateId(string templateId)
Parameters:templateIdstring

The ID of the template element for Template

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The template which renders the chart series label.The fields which can be used in the template are: category - the category name. Available for area, bar, column, bubble, donut, line, pie and waterfall series.; dataItem - the original data item used to construct the point. Will be null if binding to array.; percentage - the point value represented as a percentage value. Available only for donut, pie and 100% stacked charts.; series - the data series; stackValue - the cumulative point value on the stack. Available only for stackable series.; value - the point value. Can be a number or object containing each bound field.; runningTotal - the sum of point values since the last "runningTotal" summary point. Available for waterfall series. or total - the sum of all previous series values. Available for waterfall series..

C#
public ChartSeriesLabelsSettingsBuilder<T> TemplateView(IHtmlContent templateView)
Parameters:templateViewIHtmlContent

The view that contains the template for Template

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

The chart series to label configuration.

C#
public ChartSeriesLabelsSettingsBuilder<T> To(Action<ChartSeriesLabelsToSettingsBuilder<T>> configurator)
Parameters:configuratorAction<ChartSeriesLabelsToSettingsBuilder<T>>

The ChartSeriesLabelsToSettingsBuilder<T> for the to setting.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current instance of ChartSeriesLabelsSettingsBuilder<T> .

If set to true the chart will display the series labels. By default chart series labels are not displayed.

C#
public ChartSeriesLabelsSettingsBuilder<T> Visible(bool value)
Parameters:valuebool

The value for Visible

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

If set to true the chart will display the series labels. By default chart series labels are not displayed.

C#
public ChartSeriesLabelsSettingsBuilder<T> VisibleHandler(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

If set to true the chart will display the series labels. By default chart series labels are not displayed.

C#
public ChartSeriesLabelsSettingsBuilder<T> VisibleHandler(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

A function that can be used to create a custom visual for the labels. The available argument fields are: text - the label text.; rect - the kendo.geometry.Rect that defines where the visual should be rendered.; options - the label options.; createVisual - a function that can be used to get the default visual.; sender - the chart instance (may be undefined).; value - The point value.; category - The point category.; stackValue - The cumulative point value on the stack. Available only for the stackable series.; dataItem - The point dataItem.; series - The point series.; percentage - The point value that is represented as a percentage value. Available only for the Donut, Pie, and 100% stacked charts.; runningTotal - The sum of point values from the last runningTotal summary point onwards. Available for the Waterfall series. or total - The sum of all previous series values. Available for the Waterfall series..

C#
public ChartSeriesLabelsSettingsBuilder<T> Visual(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.

A function that can be used to create a custom visual for the labels. The available argument fields are: text - the label text.; rect - the kendo.geometry.Rect that defines where the visual should be rendered.; options - the label options.; createVisual - a function that can be used to get the default visual.; sender - the chart instance (may be undefined).; value - The point value.; category - The point category.; stackValue - The cumulative point value on the stack. Available only for the stackable series.; dataItem - The point dataItem.; series - The point series.; percentage - The point value that is represented as a percentage value. Available only for the Donut, Pie, and 100% stacked charts.; runningTotal - The sum of point values from the last runningTotal summary point onwards. Available for the Waterfall series. or total - The sum of all previous series values. Available for the Waterfall series..

C#
public ChartSeriesLabelsSettingsBuilder<T> Visual(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

ChartSeriesLabelsSettingsBuilder<T>

Returns the current ChartSeriesLabelsSettingsBuilder<T> instance.