@syncfusion/ej2-angular-treemap
TypeScript icon, indicating that this package has built-in type declarations

29.2.4 • Public • Published

Angular TreeMap Component

The Angular TreeMap component 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.

Getting started . Online demos . Learn more

Angular TreeMap Component

Trusted by the world's leading companies Bootstrap logo

Setup

Create an Angular Application

You can use Angular CLI to setup your Angular applications. To install the Angular CLI, use the following command.

npm install -g @angular/cli

Create a new Angular application using the following Angular CLI command.

ng new my-app
cd my-app

Add Syncfusion TreeMap package

All Syncfusion Angular packages are available in npmjs.com. To install the Angular TreeMap package, use the following command.

npm install @syncfusion/ej2-angular-treemap

The above command does the below configuration to your Angular app.

  • Adds @syncfusion/ej2-angular-treemap package and its peer dependencies to your package.json file.
  • Imports the TreeMapModule in your application module app.module.ts.
  • Registers the Syncfusion UI default theme (material) in the angular.json file.

This makes it easy to add the Syncfusion Angular TreeMap module to your project and start using it in your application.

Add TreeMap component

In src/app/app.component.ts, use <ejs-treemap> selector in the template attribute of the @Component directive to render the Syncfusion Angular TreeMap component.

import { Component } from '@angular/core';
@Component({
selector: 'app-container',
template:
`<ejs-treemap id='container' style='display: block;' height='350px' [dataSource]='data' weightValuePath='Count'
[leafItemSettings]='leafItemSettings'>
</ejs-treemap>`
})
export class AppComponent {
  public data: object[] = [
    { State: 'Brazil', Count: 25 },
    { State: 'Colombia', Count: 12 },
    { State: 'Argentina', Count: 9 },
    { State: 'Ecuador', Count: 7 },
    { State: 'Chile', Count: 6 },
    { State: 'Peru', Count: 3 },
    { State: 'Venezuela', Count: 3 },
    { State: 'Bolivia', Count: 2 },
    { State: 'Paraguay', Count: 2 },
    { State: 'Uruguay', Count: 2 },
    { State: 'Falkland Islands',Count: 1 },
    { State: 'French Guiana', Count:1 },
    { State: 'Guyana', Count: 1 },
    { State: 'Suriname', Count: 1 },
  ];
  public leafItemSettings: object = {
    labelPath: 'State'
  };
}

Supported frameworks

TreeMap component is also offered in the following list of frameworks.


     JavaScript    

       React      

       Vue         

  ASP.NET Core  

  ASP.NET MVC  

Showcase samples

Key features

  • Data sources: Binds the treemap component with an array of JSON objects or DataManager. Both hierarchical and flat collection data sources are supported.
  • Levels: Renders with any number of levels and items.
  • Layout: Supports four types of layouts: square, horizontal, vertical, and auto.
  • Drill-down: Provides drill-down option to have a closer look at the lower level of a hierarchy.
  • Data label: Provides additional information about the nodes.
  • Header template: Uses any custom HTML element to customize the header of each item.
  • Label template: Uses any custom HTML element to customize the data label for each node.
  • Color mapping: Applies colors to the nodes based on various conditions. Treemap supports three types of color mapping: range, equal, and desaturation.
  • Legend: Provide useful information for conveying what the treemap showcases.
  • Selection and highlight: Support selecting or highlighting the nodes to bring center of attraction.
  • Tooltip: Provides additional information about the node on hover.
  • Print and Export: Prints or exports the rendered treemap to a desired format. Exporting supports four formats: PDF, PNG, JPEG and SVG.
  • Globalization: Personalize the treemap component with different languages, as well as culture-specific number, date and time formatting.
  • Accessibility: Provides with built-in accessibility support which helps to access all the treemap component features through the keyboard, screen readers, or other assistive technology devices.

Support

Product support is available through the following mediums.

Changelog

Check the changelog here. 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 component, is subject to the terms and conditions of Syncfusion's EULA. To acquire a license for 80+ Angular UI components, you can purchase or start a free 30-day trial.

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.

See LICENSE FILE for more info.

© Copyright 2025 Syncfusion® Inc. All Rights Reserved. The Syncfusion® Essential Studio® license and copyright applies to this distribution.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
29.2.488latest
29.2.4-ngcc39ngcc
21.1.421beta

Version History

VersionDownloads (Last 7 Days)Published
29.2.488
29.2.4-ngcc39
29.1.3371
29.1.33-ngcc0
28.2.3302
28.2.3-ngcc0
28.1.391
28.1.39-ngcc0
28.1.331
28.1.33-ngcc1
27.2.232
27.2.2-ngcc0
27.1.5552
27.1.55-ngcc2
27.1.530
27.1.53-ngcc1
27.1.500
27.1.50-ngcc0
27.1.481
27.1.48-ngcc0
26.2.105
26.2.10-ngcc1
26.2.50
26.2.5-ngcc0
26.2.40
26.2.4-ngcc0
26.1.357
26.1.35-ngcc1
25.2.311
25.2.3-ngcc1
25.1.351
25.1.35-ngcc1
24.2.315
24.2.3-ngcc0
24.1.410
24.1.41-ngcc0
23.2.42,194
23.2.4-ngcc0
23.1.3641
23.1.36-ngcc0
22.2.51
22.2.5-ngcc0
22.1.360
22.1.36-ngcc1
21.1.421
21.1.361
21.1.36-ngcc1
22.1.342
22.1.34-ngcc0
21.2.108
21.2.10-ngcc0
21.2.31
21.2.3-ngcc0
21.1.371
21.1.37-ngcc0
21.1.351
21.1.35-ngcc0
20.4.4811
20.4.48-ngcc0
20.4.4236
20.4.42-ngcc0
20.4.401
20.4.40-ngcc1
20.4.380
20.4.38-ngcc1
20.3.591
20.3.59-ngcc0
20.3.567
20.3.56-ngcc0
20.3.477
20.3.47-ngcc1
20.2.453
20.2.45-ngcc1
20.2.430
20.2.43-ngcc0
20.2.387
20.2.38-ngcc1
20.2.37-ngcc1
20.2.361
20.2.36-ngcc0
20.1.591
20.1.550
20.1.470
19.4.5211
19.4.481
19.4.380
19.3.5341
19.3.433
19.2.602
19.2.551
19.2.490
19.2.471
19.2.441
19.1.630
19.1.540
18.4.393
18.4.300
18.3.470
18.3.351
18.2.581
18.2.540
18.2.440
18.1.540
18.1.521
18.1.4610
18.1.421
18.1.36-beta0
17.4.510
17.4.470
17.4.460
17.4.430
17.4.392
17.3.270
17.3.260
17.3.200
17.3.191
17.3.140
17.3.9-beta0
17.2.48-beta0
17.2.29-beta0
17.2.470
17.2.461
17.2.340
17.2.28-beta0
17.1.481
17.1.470
17.1.440
17.1.421
17.1.390
17.1.381
17.1.32-beta0
16.4.521
17.1.1-beta1
16.4.470
16.4.420
16.4.40-beta1
16.3.340
16.3.331
16.3.303
16.3.291
16.3.240
16.3.210
16.3.180
16.3.170

Package Sidebar

Install

npm i @syncfusion/ej2-angular-treemap

Weekly Downloads

3,061

Version

29.2.4

License

SEE LICENSE IN license

Unpacked Size

177 kB

Total Files

35

Last publish

Collaborators

  • syncfusionorg
  • essentialjs2
  • syncfusion-javascript