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

Kendo UI legend TagHelper SankeyLegendSettingsTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("legend", ParentTag = "kendo-sankey", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("border", new string[] { "item", "labels", "margin", "padding", "title" })]
[SuppressTagRendering]
public class SankeyLegendSettingsTagHelper : TagHelperChildBase, ITagHelper, ITagHelperComponent

Inheritance: objectTagHelperTagHelperChildBaseSankeyLegendSettingsTagHelper

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-sankey name="sankey">
    <legend align="LabelAlign.Center"></legend>
    <data>
        <nodes>
            <node id="1">
                <label text="Source">
                </label>
            </node>
            <node id="2">
                <label text="Target"></label>
            </node>
        </nodes>
        <links>
            <link source-id="1" target-id="2" value="12"/>
        </links>
    </data>
</kendo-sankey>

Constructors

Initializes a new instance of the SankeyLegendSettingsTagHelper class.

C#
public SankeyLegendSettingsTagHelper()

Properties

The alignment of the legend label.

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

The background color of the legend.

C#
public string Background { get; set; }

The height of the legend.

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

The X offset of the Sankey 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 Sankey 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; }

The position of the label.

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

The position of the label.

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

If set to true the legend items will be reversed.

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 false the Sankey will not display the legend.

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>