We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

The JavaScript TreeMap is a feature-rich control used to visualize both hierarchical and flat data. Customize the look and feel of the tree maps by using built-in features like color mapping, legends, and label templates.


Leaf node

A treemap contains groups of data collections. Each group has one or more leaf nodes. Each leaf node is displayed as a rectangle, sized and colored according to values that you assign.

JavaScript TreeMap is rendered with leaf nodes.


Levels

Render any number of child items for each individual node in the a tree map and they are categorized them to form levels.

JavaScript TreeMap is rendered with multiple levels.


Color mapping

Categorize the nodes by customizing their colors based on the underlying values.

Range color mapping is applied to the nodes in JavaScript TreeMap.

Range color mapping

Apply colors to the nodes by comparing their values with a desired numeric range. For example, colors can be applied to countries based on their population growth.

Equal color mapping is applied to the nodes in JavaScript TreeMap.

Equal color mapping

Use equal color mapping to differentiate an item’s fill based on its underlying value and color. For example, colors can be applied to states based on a winning candidate.

Desaturation color mapping is applied to the nodes in JavaScript TreeMap.

Desaturation color mapping

Apply colors to the nodes by comparing their values with desaturation color order. For example, transparent color can be applied to countries based on their population variation from higher to lower.


Data labels

Data labels in the JavaScript TreeMap control are used to display more details about a particular item. Labels can be trimmed, hidden, or wrapped if the label width exceeds the item bounds.

JavaScript TreeMap is rendered with data labels.


Label template

Render any HTML element as a label for the nodes in the a tree map.

JavaScript TreeMap is rendered with label template.


Drill-down

Zoomable JavaScript TreeMap control provides support to drill the parent items to have a more detailed look at their child items.

JavaScript TreeMap is rendered with drill-down.


Legends

Use legends to add additional information for interpreting a treemap with various colors, shapes, or other identifiers.

Legend Types

The JavaScript TreeMap control provides two types of legend, default and interactive.

JavaScript TreeMap is rendered with default legend.

Default

A default legend contains swatches of symbols with descriptions to denote the categories of items.

JavaScript TreeMap is rendered with an interactive legend.

Interactive

An interactive legend is used to find the range of an underlying item’s value on mouse over.


Legend customization

JavaScript TreeMap is rendered with modified legend positions.

Legend position

Position the legend to top, bottom, left, or right of the a tree map.

JavaScript TreeMap is rendered with modified shapes for legend items.

Legend item shape

Change the legend item shape to a circle, rectangle, or another built-in custom shape to represent the items.


Layout types

Use different layouts types to view the child nodes in effective ways.

JavaScript TreeMap is rendered with squarified layout type

Squarified

Visualize the data in the form of square-like rectangles with best aspect ratio in this layout.

JavaScript TreeMap is rendered with auto slice and dice layout type

Auto slice and dice

Visualize the data in the form of long, thin rectangles that can be displayed either vertically or horizontally with high aspect ratio in this layout.

JavaScript TreeMap is rendered with horizontal slice and dice layout type

Horizontal Slice slice and dice horizontal

This layout creates rectangles with high aspect ratio and displays them horizontally.

JavaScript TreeMap is rendered with vertical slice and dice layout type

Vertical slice and dice

This layout creates rectangles with high aspect ratio and displays them sorted vertically.


Tooltip

When the mouse hovers over the an item, the interactive JavaScript TreeMap control displays details about the item’s values in a tooltip.

Display a tooltip on moving the mouse over the nodes in JavaScript TreeMap.


Selection and highlighting

Select a particular shape on mouse click and highlight on mouse over to bring it to the center of attraction over other items in the a tree map.

A particular shape is selected in the rendered JavaScript TreeMap.


Title and subtitle

Add a title and subtitle to visualize additional information on a tree map. You can customize the font and alignment of the titles and subtitles.

JavaScript TreeMap is rendered with title and subtitle


Appearance

Customize the look and feel of a tree map by changing the fill color, background, border, and opacity of the items.

JavaScript TreeMap is rendered with customized nodes.

Node customization

Change the fill color, background, border, and opacity of the nodes to customize the appearance.

JavaScript TreeMap is rendered with gaps for nodes.

Gap customization

Enhance the readability by customizing the gaps within the groups of leaf nodes.

JavaScript TreeMap is rendered with a palette of colors for nodes.

Palette

Built-in palettes with customizable options are available by default.


Right to left (RTL)

You can render the tree map elements like nodes, headers, labels, and legends in the right-to-left direction.

JavaScript TreeMap is rendered with right-to-left format


Exporting

Exports the a tree map to a PDF document or in image formats such as SVG, PNG, and JPEG in client-side.

Export JavaScript TreeMap illustration.

Export

Exports the treemap to a PDF document or in image formats such as SVG, PNG, and JPEG in client-side.

Print JavaScript TreeMap illustration.

Print

Print the rendered treemap directly from the browser.


Touch and browser support

The interactive TreeMap control supports touch interactions.

JavaScript TreeMap Touch illustration

Touch support

All the tree map features will work on touch devices with zero configuration. Use touch features such as tooltips, drill-down, selection, and highlighting without any customization.

JavaScript TreeMap Responsive illustration

Responsive

You can view the JavaScript TreeMap control on various devices. Hide specific elements in a tree map for particular screen sizes by making a very minimal change in the tree map events.

JavaScript TreeMap Cross browser illustration

Cross-browser support

You can render the TreeMap component in all modern browsers.


JavaScript TreeMap Code Example

Easily get started with the JavaScript TreeMap using a few simple lines of HTML and TS code example as demonstrated below. Also explore our JavaScript Tree Map Example that shows you how to render and configure a TreeMap in JavaScript.

<div class="control-section">
    <div class="content-wrapper">
       <div id="tree"></div>
        </div>
    </div>
</div>
import { TreeMap } from '@syncfusion/ej2-treemap';
let treemap: TreeMap = new TreeMap({
height: '350px',
dataSource: [
    { Title: 'State wise International Airport count in South America', State: "Brazil", Count: 25 },
    { Title: 'State wise International Airport count in South America', State: "Colombia", Count: 12 },
    { Title: 'State wise International Airport count in South America', State: "Argentina", Count: 9 },
    { Title: 'State wise International Airport count in South America', State: "Ecuador", Count: 7 },
    { Title: 'State wise International Airport count in South America', State: "Chile", Count: 6 },
    { Title: 'State wise International Airport count in South America', State: "Peru", Count: 3 },
    { Title: 'State wise International Airport count in South America', State: "Venezuela", Count: 3 },
    { Title: 'State wise International Airport count in South America', State: "Bolivia", Count: 2 },
    { Title: 'State wise International Airport count in South America', State: "Paraguay", Count: 2 },
    { Title: 'State wise International Airport count in South America', State: "Uruguay", Count: 2 },
    { Title: 'State wise International Airport count in South America', State: "Falkland Islands",Count: 1 },
    { Title: 'State wise International Airport count in South America', State: "French Guiana", Count:1 },
    { Title: 'State wise International Airport count in South America', State: "Guyana", Count: 1 },
    { Title: 'State wise International Airport count in South America', State: "Suriname", Count: 1 },
],
weightValuePath: 'Count',
leafItemSettings: {
    labelPath: 'State',
}
}, '#tree');

Other supported frameworks

The TreeMap component is also available in Blazor, React, Angular, and Vue frameworks. Check out the different TreeMap platforms from the links below,




70+ JAVASCRIPT UI CONTROLS

Frequently Asked Questions

The Syncfusion JavaScript TreeMap provides the following features:

  • Visualize both hierarchical and flat collection data.
  • Drill-down the tree maps to get a clear look at each node in a huge collection of data.
  • Customize the look and feel of the tree maps by using built-in features like color mapping, legends, and label templates.
  • One of the best JavaScript TreeMap in the market that offers feature-rich UI to interact with the software.
  • Simple configuration and API.
  • Supports all modern browsers.
  • Mobile-touch friendly and responsive.
  • Expansive learning resources such as demos and documentation to learn quickly and get started with JavaScript TreeMap.

We do not sell the JavaScript TreeMap separately. It is only available for purchase as part of the Syncfusion JavaScript suite, which contains over 70 JavaScript components, including the TreeMap. A single developer license for the Syncfusion Essential Studio for JavaScript suite costs $995.00 USD, including one year of support and updates. On top of this, we might be able to offer additional discounts based on currently active promotions. Please contact our sales team today to see if you qualify for any additional discounts.

You can find our JavaScript TreeMap demo here.

No, our 70 JavaScript components, including TreeMap, are not sold individually, only as a single package. However, we have competitively priced the product so it only costs a little bit more than what some other vendors charge for their TreeMap alone. We have also found that, in our experience, our customers usually start off using one of our products and then expand to several products quickly, so we felt it was best to offer all 70 JavaScript components for a flat fee of $995/developer. On top of this, we might be able to offer additional discounts based on currently active promotions. Please contact our sales team today to see if you qualify for any additional discounts.

No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue and five or fewer developers.

A good place to start would be our comprehensive getting started documentation.

Read independent,
authenticated reviews
on G2

Download Now Pricing

What do our customers say about us?

double quotes

We're using the file formats and Windows/JavaScript list controls a lot. They're fast, easy to use, and the documentation is good and contains examples. Tickets with questions or suggestions were answered within a day, so we're happy to use the Syncfusion libraries.
Daniel Persidok

Daniel Persidok

wpd onshore GmbH & Co. KG

double quotes

Using Syncfusion Angular and JavaScript controls makes front-end web development a piece of cake. Each component has many properties that can be configured as per your desire, methods that can be used to interact with the element, and a lot of events that trigger at different stages, which makes modifying your components according to the state of the application an easy task. Also, their support is amazing! They always offer a sample working project, which makes it very simple to solve your question about your code.
Carlos Rodriguez Garcia

Carlos Rodriguez Garcia

Vistatec

Transform your applications today by downloading our free evaluation version Download Free Trial

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile