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

TreeMap

Class

Definition

Constructors

C#
public TreeMap(ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator urlGenerator)
Parameters:viewContextViewContextinitializerIJavaScriptInitializerurlGeneratorIUrlGenerator

Fields

C#
public IUrlGenerator urlGenerator

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; }
C#
public List<string[]> ColorRanges { 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 string[] Colors { get; set; }
C#
public DataSource DataSource { get; }

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 handler for the Template

C#
public string TemplateHandler { get; set; }

The id for the Template

C#
public string TemplateId { 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

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

IDictionary<string, object>

Overrides: WidgetBase.Serialize()

Writes the HTML.

C#
protected override void WriteHtml(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: WidgetBase.WriteHtml(HtmlTextWriter)

Writes the initialization script.

C#
public override void WriteInitializationScript(TextWriter writer)
Parameters:writerTextWriter

The writer.

Overrides: WidgetBase.WriteInitializationScript(TextWriter)