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

1.12.0 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @perfsee/treemap

Weekly Downloads

0

Version

1.12.0

License

Apache-2.0

Unpacked Size

1.32 MB

Total Files

62

Last publish

Collaborators

  • domonji
  • eyhn
  • bytednpm
  • forehalo
  • jianling