Socket
Book a DemoInstallSign in
Socket

@perfsee/treemap

Package Overview
Dependencies
Maintainers
5
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@perfsee/treemap

Web tree map chart, based on webgl.

latest
Source
npmnpm
Version
1.14.2
Version published
Maintainers
5
Created
Source

Treemap

Web tree map chart, based on webgl.

CodeSandbox Demo

Usage

import { hierarchy, TreeMap } from '@perfsee/treemap'

const treemapData = hierarchy({
  name: 'root',
  children: [
    {
      name: 'a',
      value: 30,
    },
    {
      name: 'b',
      value: 70,
    },
  ],
}).sum((d) => (d.children ? 0 : d.value || 0))

const treeMap = new TreeMap(canvasRef.current!, treemapData)

Notion:

  • The hierarchy() function is re-export from d3-hierarchy module, you can find the document from here.

FAQs

Package last updated on 31 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts