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

Kendo UI legend TagHelper ChartLegendSettingsTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("chart-legend", ParentTag = "kendo-chart", TagStructure = TagStructure.NormalOrSelfClosing)]
[HtmlTargetElement("chart-legend", ParentTag = "kendo-sparkline", TagStructure = TagStructure.NormalOrSelfClosing)]
[HtmlTargetElement("chart-legend", ParentTag = "kendo-stockchart", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("border", new string[] { "inactive-items", "item", "labels", "margin", "padding", "title", "focus-highlight" })]
[SuppressTagRendering]
public class ChartLegendSettingsTagHelper : TagHelperChildBase, ITagHelper, ITagHelperComponent

Inheritance: objectTagHelperTagHelperChildBaseChartLegendSettingsTagHelper

Implements: ITagHelperITagHelperComponent

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">
    <chart-legend align="ChartLegendAlign.Center"></chart-legend>
</kendo-chart>

Constructors

Initializes a new instance of the ChartLegendSettingsTagHelper class.

C#
public ChartLegendSettingsTagHelper()

Properties

Specifies the legend align.

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

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

C#
public string Background { get; set; }

The legend height when the legend.orientation is set to "vertical".

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

The X offset of the chart legend. The offset is relative to the default position of the legend. For instance, a value of 20 will move the legend 20 pixels to the right of its initial position. A negative value will move the legend to the left of its current position.

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

The Y offset of the chart legend. The offset is relative to the current position of the legend. For instance, a value of 20 will move the legend 20 pixels down from its initial position. A negative value will move the legend upwards from its current position.

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

Specifies the legend orientation.

C#
public ChartLegendOrientation? Orientation { get; set; }

Specifies the legend position.

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

If set to true the legend items will be reversed.Available in versions 2013.3.1306 and later.

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

The spacing between the labels in pixels when the legend.orientation is "horizontal".

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

If set to true the chart will display the legend. By default the chart legend is visible.

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

The legend width when the legend.orientation is set to "horizontal".

C#
public double? Width { 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>