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

Kendo UI TreeMap TagHelper TreeMapTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("kendo-treemap")]
[RestrictChildren("hierarchical-datasource", new string[] { "treemap-template" })]
public class TreeMapTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent, IDataBoundWidget<HierarchicalDataSourceTagHelper>, ITemplateComponent

Inheritance: objectTagHelperTagHelperBaseTreeMapTagHelper

Implements: IDataBoundWidget<HierarchicalDataSourceTagHelper>ITagHelperITagHelperComponentITemplateComponent

Inherited Members TagHelperBase.MinimumValidatorTagHelperBase.MaximumValidatorTagHelperBase.Init(TagHelperContext)TagHelperBase.Process(TagHelperContext, TagHelperOutput)TagHelperBase.GetInitializator()TagHelperBase.VerifySettings()TagHelperBase.SerializeTemplates()TagHelperBase.GenerateId(TagHelperOutput)TagHelperBase.CreateHandler(string)TagHelperBase.GetRangeValidationParameter<TValue>(ModelExplorer, string)TagHelperBase.ExtractEditFormat(string)TagHelperBase.ToDictionaryHandler(IDictionary<string, string>)TagHelperBase.AddSelfToTemplate(TagHelperContext)TagHelperBase.ViewContextTagHelperBase.GeneratorTagHelperBase.InitializerTagHelperBase.WriterTagHelperBase.ScriptAttributesTagHelperBase.NameTagHelperBase.IdTagHelperBase.SelectorTagHelperBase.IdPrefixTagHelperBase.IsInClientTemplateTagHelperBase.DeferredTagHelperBase.AsModuleTagHelper.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-treemap value-field="Value"
               text-field="Name"
               name="treeMap">
       <hierarchical-datasource>
           <transport>
               <read url="@Url.Action("Population_Read", "TreeMap")"/>
           </transport>
           <schema>
               <hierarchical-model children="Items">
               </hierarchical-model>
           </schema>
       </hierarchical-datasource>
   </kendo-treemap>

Constructors

Initializes a new instance of the TreeMapTagHelper class.

C#
public TreeMapTagHelper(IKendoHtmlGenerator generator)
Parameters:generatorIKendoHtmlGenerator

Properties

If set to false the widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the data source specified in the configuration.

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

The data item field which contains the tile color.

C#
public string ColorField { get; set; }

The default colors for the TreeMap items (tiles). Can be set to array of specific colors or array of color ranges. For more information on the widget behavior, see the Colors section on the TreeMap Overview page.

C#
public object[] Colors { get; set; }

The Id of the data source.

C#
[HtmlAttributeName("datasource-id")]
public string DataSourceId { get; set; }

The name of the JavaScript function that will handle the dataBound event. Fired when the widget is bound to data from its dataSource.

C#
public string OnDataBound { get; set; }

The name of the JavaScript function that will handle the itemCreated event. Fired when a tile has been created.

C#
public string OnItemCreated { get; set; }

The template which renders the treeMap tile content.The fields which can be used in the template are: dataItem - the original data item used to construct the point. or text - the original tile text..

C#
public string Template { get; set; }

The template which renders the treeMap tile content.The fields which can be used in the template are: dataItem - the original data item used to construct the point. or text - the original tile text.. 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 treeMap tile content.The fields which can be used in the template are: dataItem - the original data item used to construct the point. or text - the original tile text.. This option expects the ID of the script element that contains the template.

C#
public string TemplateId { get; set; }

Represents a collection of templates defined for the component.

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

Implements: ITemplateComponent.Templates

The template which renders the treeMap tile content.The fields which can be used in the template are: dataItem - the original data item used to construct the point. or text - the original tile text.. This option expects the IHtmlContent instance containing the created HTML.

C#
public IHtmlContent TemplateView { get; set; }

The data item field which contains the tile title.

C#
public string TextField { get; set; }

The theme of the TreeMap.Note: Since Q2 2024 release, the default value for the theme property is "sass" instead of "default". It is recommended to use "sass" with version Q2 2024 or later.

C#
public string Theme { get; set; }

The layout type for the Treemap.

C#
public TreeMapType? Type { get; set; }

The data item field which contains the tile value.

C#
public string ValueField { get; set; }

Methods

Gets the initialization script.

C#
protected override string GetInitializationScript()
Returns:

string

The initialization script.

Overrides: TagHelperBase.GetInitializationScript()

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

Task

Overrides: TagHelper.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

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

IDictionary<string, object>

Overrides: TagHelperBase.Serialize()

SerializeEvents method.

C#
protected override Dictionary<string, object> SerializeEvents()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeEvents()

SerializeSettings method.

C#
protected override Dictionary<string, object> SerializeSettings()
Returns:

Dictionary<string, object>

Overrides: TagHelperBase.SerializeSettings()

Writes the HTML output.

C#
protected override void WriteHtml(TagHelperOutput output)
Parameters:outputTagHelperOutput

The TagHelper output.

Overrides: TagHelperBase.WriteHtml(TagHelperOutput)