UNPKG

@syncfusion/ej2-treemap

Version:
81 lines (57 loc) 8.82 kB
# JavaScript TreeMap Control The [JavaScript TreeMap](https://www.syncfusion.com/javascript-ui-controls/js-treemap?utm_source=npm&utm_medium=listing&utm_campaign=javascript-treemap-npm) control provides a simple and effective way to visualize flat or hierarchical data as clustered rectangles with a specific, weighted attribute determining the size of each rectangle. <p align="center"> <a href="https://ej2.syncfusion.com/documentation/treemap/getting-started/?utm_source=npm&utm_medium=listing&utm_campaign=javascript-treemap-npm">Getting started</a> . <a href="https://ej2.syncfusion.com/demos/?utm_source=npm&utm_medium=listing&utm_campaign=javascript-treemap-npm#/material/treemap/default.html">Online demos</a> . <a href="https://www.syncfusion.com/javascript-ui-controls/js-treemap?utm_source=npm&utm_medium=listing&utm_campaign=javascript-treemap-npm">Learn more</a> </p> <p align="center"> <img src="https://raw.githubusercontent.com/SyncfusionExamples/nuget-img/master/javascript/javascript-treemap.png" alt="JavaScript TreeMap Control"> </p> <p align="center"> Trusted by the world's leading companies <a href="https://www.syncfusion.com"> <img src="https://raw.githubusercontent.com/SyncfusionExamples/nuget-img/master/syncfusion/syncfusion-trusted-companies.webp" alt="Bootstrap logo"> </a> </p> ## Setup To install the TreeMap and its dependent packages, use the following command. ```sh npm install @syncfusion/ej2-treemap ``` ## Supported frameworks TreeMap control is also offered in the following list of frameworks. | [<img src="https://ej2.syncfusion.com/github/images/angular-new.svg" height="50" />](https://www.syncfusion.com/angular-ui-components?utm_medium=listing&utm_source=github)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Angular](https://www.syncfusion.com/angular-ui-components?utm_medium=listing&utm_source=github)&nbsp;&nbsp;&nbsp;&nbsp; | [<img src="https://ej2.syncfusion.com/github/images/react.svg" height="50" />](https://www.syncfusion.com/react-ui-components?utm_medium=listing&utm_source=github)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[React](https://www.syncfusion.com/react-ui-components?utm_medium=listing&utm_source=github)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | [<img src="https://ej2.syncfusion.com/github/images/vue.svg" height="50" />](https://www.syncfusion.com/vue-ui-components?utm_medium=listing&utm_source=github)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Vue](https://www.syncfusion.com/vue-ui-components?utm_medium=listing&utm_source=github)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | [<img src="https://ej2.syncfusion.com/github/images/netcore.svg" height="50" />](https://www.syncfusion.com/aspnet-core-ui-controls?utm_medium=listing&utm_source=github)<br/>&nbsp;&nbsp;[ASP.NET&nbsp;Core](https://www.syncfusion.com/aspnet-core-ui-controls?utm_medium=listing&utm_source=github)&nbsp;&nbsp; | [<img src="https://ej2.syncfusion.com/github/images/netmvc.svg" height="50" />](https://www.syncfusion.com/aspnet-mvc-ui-controls?utm_medium=listing&utm_source=github)<br/>&nbsp;&nbsp;[ASP.NET&nbsp;MVC](https://www.syncfusion.com/aspnet-mvc-ui-controls?utm_medium=listing&utm_source=github)&nbsp;&nbsp; | | :-----: | :-----: | :-----: | :-----: | :-----: | ## Showcase samples * Olympic medal categories details - [Live Demo](https://ej2.syncfusion.com/demos/?utm_source=npm&utm_campaign=javascript-treemap-npm#/material/treemap/customization.html) * Countries population details - [Live Demo](https://ej2.syncfusion.com/demos/?utm_source=npm&utm_campaign=javascript-treemap-npm#/material/treemap/drilldown.html) ## Key features * [Data sources](https://ej2.syncfusion.com/documentation/treemap/data-binding/?utm_source=npm&utm_campaign=javascript-treemap-npm): Binds the treemap control with an array of JSON objects or DataManager. Both hierarchical and flat collection data sources are supported. * [Levels](https://ej2.syncfusion.com/documentation/treemap/levels/?utm_source=npm&utm_campaign=javascript-treemap-npm): Renders with any number of levels and items. * [Layout](https://ej2.syncfusion.com/documentation/treemap/layout/?utm_source=npm&utm_campaign=javascript-treemap-npm): Supports four types of layouts: square, horizontal, vertical, and auto. * [Drill-down](https://ej2.syncfusion.com/documentation/treemap/drilldown/?utm_source=npm&utm_campaign=javascript-treemap-npm): Provides drill-down option to have a closer look at the lower level of a hierarchy. * [Data label](https://ej2.syncfusion.com/documentation/treemap/data-label/?utm_source=npm&utm_campaign=javascript-treemap-npm): Provides additional information about the nodes. * [Header template](https://ej2.syncfusion.com/documentation/treemap/levels/?utm_source=npm&utm_campaign=javascript-treemap-npm#header-template-and-position): Uses any custom HTML element to customize the header of each item. * [Label template](https://ej2.syncfusion.com/documentation/treemap/data-label/?utm_source=npm&utm_campaign=javascript-treemap-npm#template): Uses any custom HTML element to customize the data label for each node. * [Color mapping](https://ej2.syncfusion.com/documentation/treemap/color-mapping/?utm_source=npm&utm_campaign=javascript-treemap-npm): Applies colors to the nodes based on various conditions. Treemap supports three types of color mapping: range, equal, and desaturation. * [Legend](https://ej2.syncfusion.com/documentation/treemap/legend/?utm_source=npm&utm_campaign=javascript-treemap-npm): Provide useful information for conveying what the treemap showcases. * [Selection and highlight](https://ej2.syncfusion.com/documentation/treemap/selection-and-highlight/?utm_source=npm&utm_campaign=javascript-treemap-npm): Support selecting or highlighting the nodes to bring center of attraction. * [Tooltip](https://ej2.syncfusion.com/documentation/treemap/tooltip/?utm_source=npm&utm_campaign=javascript-treemap-npm): Provides additional information about the node on hover. * [Print and Export](https://ej2.syncfusion.com/documentation/treemap/print-and-export/?utm_source=npm&utm_campaign=javascript-treemap-npm): Prints or exports the rendered treemap to a desired format. Exporting supports four formats: PDF, PNG, JPEG and SVG. * [Globalization](https://ej2.syncfusion.com/documentation/treemap/internationalization/?utm_source=npm&utm_medium=listing&utm_campaign=javascript-treemap-npm): Personalize the treemap control with different languages, as well as culture-specific number, date and time formatting. * [Accessibility](https://ej2.syncfusion.com/documentation/treemap/accessibility/?utm_source=npm&utm_medium=listing&utm_campaign=javascript-treemap-npm): Provides with built-in accessibility support which helps to access all the treemap control features through the keyboard, screen readers, or other assistive technology devices. ## Support Product support is available through the following mediums. * [Support ticket](https://support.syncfusion.com/support/tickets/create) - Guaranteed Response in 24 hours | Unlimited tickets | Holiday support * [Community forum](https://www.syncfusion.com/forums/essential-js2?utm_source=npm&utm_medium=listing&utm_campaign=javascript-treemap-npm) * [GitHub issues](https://github.com/syncfusion/ej2-javascript-ui-controls/issues/new) * [Request feature or report bug](https://www.syncfusion.com/feedback/javascript?utm_source=npm&utm_medium=listing&utm_campaign=javascript-treemap-npm) * Live chat ## Changelog Check the changelog [here](https://github.com/syncfusion/ej2-javascript-ui-controls/blob/master/controls/treemap/CHANGELOG.md?utm_source=npm&utm_campaign=javascript-treemap-npm). Get minor improvements and bug fixes every week to stay up to date with frequent updates. ## License and copyright > This is a commercial product and requires a paid license for possession or use. Syncfusion’s licensed software, including this control, is subject to the terms and conditions of Syncfusion's [EULA](https://www.syncfusion.com/eula/es/). To acquire a license for 80+ [JavaScript UI controls](https://www.syncfusion.com/javascript-ui-controls), you can [purchase](https://www.syncfusion.com/sales/products) or [start a free 30-day trial](https://www.syncfusion.com/account/manage-trials/start-trials). > A [free community license](https://www.syncfusion.com/products/communitylicense) is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue and five or fewer developers. See [LICENSE FILE](https://github.com/syncfusion/ej2/blob/master/license?utm_source=npm&utm_campaign=javascript-treemap-npm) for more info. © Copyright 2025 Syncfusion<sup>®</sup> Inc. All Rights Reserved. The Syncfusion<sup>®</sup> Essential Studio<sup>®</sup> license and copyright applies to this distribution.