@sanskarin/repodna-visualization
v1.4.5
Published
Framework-neutral chart geometry for RepoDNA: palettes, scales, treemaps, layered graphs, and heatmaps.
Maintainers
Readme
RepoDNA visualization
Framework-neutral chart geometry from RepoDNA: number formats, palettes for light and dark themes, linear scales, treemaps, layered graph layouts, and weekday-by-hour heatmaps. Every function returns plain data (positions, paths, colors) that any renderer can draw; the RepoDNA web interface and desktop app draw their charts with it.
import { thousands, treemap } from "@sanskarin/repodna-visualization";
// Rectangles for two directories in a 640 by 360 area, largest first.
const cells = treemap(
[
{ value: 1200, data: "src" },
{ value: 300, data: "tests" },
],
640,
360,
);
console.log(thousands(12345), cells);Install
npm install @sanskarin/repodna-visualizationThe package is on npmjs.com and on GitHub Packages, which asks for a GitHub token even to install public packages; see the installation guide.
Licensed under the Apache License 2.0.
