Declarative, functional & multi-format data visualization toolkit based around @thi.ng/hiccup
npm install @thi.ng/viz
!npm downloads

> [!NOTE]
> This is one of 214 standalone projects, maintained as part
> of the @thi.ng/umbrella monorepo
> and anti-framework.
>
> 🚀 Please help me to work full-time on these projects by sponsoring me on
> GitHub. Thank you! ❤️
- About
- Status
- Related packages
- Installation
- Dependencies
- Usage examples
- API
- Authors
- License
Declarative, functional & multi-format data visualization toolkit based around @thi.ng/hiccup.
This package largely started as a port of the visualization module of the
Clojure version thi.ng/geom-clj and is still
undergoing major redesigns.
For reference & what to expect (links to the Clojure version):
| Example outputs | |
|-------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|
|  |  |
| Logarithmic X-axis, linear Y | Log X, Log Y |
|  |  |
| Line plot (cartesian) | Area plot (cartesian) |
|  |  |
| Line plot (polar) | Area plot (polar) |
|  |  |
| Single value per domain position | 3 interleaved values (datasets) per domain position |
|  |  |
| 6 categories, 3 data sets, single values | 6 categories, 3 data sets, min-max intervals |
|  |  |
| Heatmap w/ rainbow gradient presets | |
|  |  |
| Heatmap polar projection | |
|  |  |
| w/ custom shape fn | polar projection, custom shape fn |
|  |  |
| Contour plot | |
|  | |
ALPHA - bleeding edge / work-in-progress
Search or submit any issues for this package
- @thi.ng/hiccup - HTML/SVG/XML serialization of nested data structures, iterables & closures
- @thi.ng/hiccup-canvas - Hiccup shape tree renderer for vanilla Canvas 2D contexts
- @thi.ng/hiccup-svg - SVG element functions for @thi.ng/hiccup & related tooling
``bash`
yarn add @thi.ng/viz
ESM import:
`ts`
import * as viz from "@thi.ng/viz";
Browser ESM import:
`html`
For Node.js REPL:
`js`
const viz = await import("@thi.ng/viz");
Package sizes (brotli'd, pre-treeshake): ESM: 2.99 KB
- @thi.ng/api
- @thi.ng/arrays
- @thi.ng/checks
- @thi.ng/math
- @thi.ng/object-utils
- @thi.ng/strings
- @thi.ng/transducers
- @thi.ng/vectors
Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)
Two projects in this repo's
/examples
directory are using this package:
| Screenshot | Description | Live demo | Source |
|:-------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------|:-------------------------------------------------------|:------------------------------------------------------------------------------------|
|
| Interactive ridge-line plot | Demo | Source |
|
| Interactive scatter & line plot of low-discrepancy samples | Demo | Source |
TODO
If this project contributes to an academic publication, please cite it as:
`bibtex``
@misc{thing-viz,
title = "@thi.ng/viz",
author = "Karsten Schmidt",
note = "https://thi.ng/viz",
year = 2014
}
© 2014 - 2026 Karsten Schmidt // Apache License 2.0