This package provides a WebGL treemap renderer for websites and web environments that builds upon the webgl-operate rendering middleware.
This project uses npm
(tested with 22, lower versions may work too) for setup.
nvm use 22
npm install
npm run build:dev
As there is currently no npm package published, we suggest to add this project as a submodule or copy the source code into your own project.
Example using git:
git submodule add [email protected]:varg-dev/treemap-renderer.git
cd treemap-renderer
npm install
npm run build
Example integration into an own npm package as dev dependency:
{
/* ... */
"devDependencies": {
/* ... */
"treemap-renderer": "file:deps/treemap-renderer",
/* ... */
},
/* ... */
}
The treemaps that this renderer currently supports a as follows:
- Treemap Layout:
- Packing Layout:
- Code City Layout
- Splitting Layout:
- Strip Treemap
- Snake Treemap
- Node Sorting
- Margins between Nodes
- Packing Layout:
- Color Mappings:
- Colorbrewer + Smith-Walt Color Schemes
- Explicit Colors
- Height Mapping
- Emphasis
- Labeling
There are far more features and variations imaginable, already researched, and planned to be integrated later. If you want a feature integrated, please feel free to open an issue.
Internally, the treemap renderer expects a configuration object to be filled. This configuration object is build from multiple visualization-phase-specific sub-objects, namely:
topology
: Information about nodes and their hierarchical structurebuffers
: Raw data that will be transformed for visual mappingbufferViews
: Transformations from raw data that can be used for visual mappingcolors
: Information on the used color mappingslayout
: Treemap layout configurationgeometry
: Information on the desired geometrical mapping (e.g., height)labels
: Node labels to display on screen
Minimal config:
{
"topology": {
"format": "tupled",
"semantics": "parent-id-id",
"edges": [ [ -1, 0 ]]
},
"buffers": {
"weights": [ 1.0 ]
},
"layout": {
"algorithm": "strip",
"weight": "buffer:weights"
}
}
Example config:
{
}
However, instead of filling this config directly - which can be bothersome concerning the topology -, there are a number of configuration frontends that can be used for an easier setup of a treemap.
Read: File paths
This treemap renderer was developed by a group of students and researchers having the following affiliations:
- Computer Graphics Research Group at Hasso Plattner Institute, Digital Engineering Faculty, University of Potsdam
- CG Internals
Current Maintainer: Willy Scheibel ([email protected])