Kendo UI legend TagHelper ChartLegendSettingsTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[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:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-chart name="chart">
<chart-legend align="ChartLegendAlign.Center"></chart-legend>
</kendo-chart>
Child Tags
Constructors
Initializes a new instance of the ChartLegendSettingsTagHelper class.
public ChartLegendSettingsTagHelper()
Properties
Specifies the legend align.
public ChartLegendAlign? Align { get; set; }
The background color of the legend. Accepts a valid CSS color string, including hex and rgb.
public string Background { get; set; }
The legend height when the legend.orientation is set to "vertical".
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.
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.
public double? OffsetY { get; set; }
Specifies the legend orientation.
public ChartLegendOrientation? Orientation { get; set; }
Specifies the legend position.
public ChartLegendPosition? Position { get; set; }
If set to true the legend items will be reversed.Available in versions 2013.3.1306 and later.
public bool? Reverse { get; set; }
The spacing between the labels in pixels when the legend.orientation is "horizontal".
public double? Spacing { get; set; }
If set to true the chart will display the legend. By default the chart legend is visible.
public bool? Visible { get; set; }
Methods
Adds the current TagHelper instance to its parent TagHelper.
protected override void AddSelfToParent(TagHelperContext context)
The TagHelper context.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.