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

Kendo UI labels TagHelper ChartSeriesLabelsSettingsTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("labels", ParentTag = "series-item", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("chart-series-labels-border", new string[] { "chart-series-labels-margin", "chart-series-labels-padding", "chart-series-labels-from", "chart-series-labels-to" })]
[SuppressTagRendering]
public class ChartSeriesLabelsSettingsTagHelper : TagHelperChildBase, ITagHelper, ITagHelperComponent, ITemplateComponent

Inheritance: objectTagHelperTagHelperChildBaseChartSeriesLabelsSettingsTagHelper

Implements: ITagHelperITagHelperComponentITemplateComponent

Inherited Members TagHelperChildBase.Init(TagHelperContext)TagHelperChildBase.AddSelfToContext(TagHelperContext)TagHelperChildBase.CreateHandler(string)TagHelperChildBase.IdPrefixTagHelper.Process(TagHelperContext, TagHelperOutput)TagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

<kendo-chart name="chart">
    <series>
        <series-item>
            <labels align="ChartSeriesLabelsAlign.Center"></labels>
        </series-item>
    </series>
</kendo-chart>

Constructors

Initializes a new instance of the ChartSeriesLabelsSettingsTagHelper class.

C#
public ChartSeriesLabelsSettingsTagHelper()

Properties

Specifies the alignment of the labels.

C#
public ChartSeriesLabelsAlign? Align { get; set; }

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 string AriaTemplate { get; set; }

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.. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string AriaTemplateHandler { get; set; }

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.. This option expects the ID of the script element that contains the template.

C#
public string AriaTemplateId { get; set; }

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.. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent AriaTemplateView { get; set; }

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

C#
public string Background { get; set; }

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

C#
public string BackgroundHandler { get; set; }

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

C#
public string Color { get; set; }

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

C#
public string ColorHandler { get; set; }

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

C#
public double? Distance { get; set; }

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

C#
public string Font { get; set; }

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

C#
public string FontHandler { get; set; }

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 string Format { get; set; }

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 string FormatHandler { get; set; }

Specifies the position of the labels.

C#
public ChartSeriesLabelsPosition? Position { get; set; }

Specifies the position of the labels.

C#
public string PositionHandler { get; set; }

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

C#
public string Rotation { get; set; }

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 string Template { get; set; }

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.. This option expects the name of a JavaScript function that will be called to return the template.

C#
public string TemplateHandler { get; set; }

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.. This option expects the ID of the script element that contains the template.

C#
public string TemplateId { get; set; }

Configures the templates for the ChartSeriesLabelsSettings.

C#
[HtmlAttributeNotBound]
public IDictionary<string, string> Templates { get; }

Implements: ITemplateComponent.Templates

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.. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent TemplateView { get; set; }

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

C#
public bool? Visible { get; set; }

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

C#
public string VisibleHandler { get; set; }

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. or sender - the chart instance (may be undefined)..

C#
public string Visual { get; set; }

Methods

Adds the current TagHelper instance to its parent TagHelper.

C#
protected override void AddSelfToParent(TagHelperContext context)
Parameters:contextTagHelperContext

The TagHelper context.

Overrides: TagHelperChildBase.AddSelfToParent(TagHelperContext)

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelperChildBase.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public Dictionary<string, object> Serialize()
Returns:

Dictionary<string, object>

Serializes the defined templates.

C#
public Dictionary<string, object> SerializeTemplates()
Returns:

Dictionary<string, object>