@mk7s/holochart-traces-basic
v0.1.0-alpha.0
Published
Basic trace types: scatter, bar, pie, table.
Maintainers
Readme
@mk7s/holochart-traces-basic
The basic trace types of Holochart: scatter (lines, markers, areas, bubbles), bar, pie and
table. Part of Holochart, declarative GPU charts on
three.js.
Alpha. Released as
0.1.0-alphaon the npmalphatag; APIs can change between 0.x releases. Most apps should install the full bundle,@mk7s/holochart, which includes this package.
Install
pnpm add @mk7s/holochart-traces-basic@alpha threethree is a peer dependency, so your app and Holochart share one copy. ESM-only; Node 22 and
newer can also require() it.
What it exports
basicTraces: every trace module below, to register at once- Trace modules:
scatter,bar,pie,table - Attribute schemas (experimental):
scatterAttributes,barAttributes,pieAttributes,tableAttributes timeline: builds a Gantt figure (horizontal bars on a date axis) from a table- Shared helpers (colorscales, bar stacking, slice labels) that the other trace packages build on.
These are tagged
@internal: not API, and not exported by@mk7s/holochart.
Usage
import { createChart, register } from '@mk7s/holochart-runtime';
import { builtinComponents } from '@mk7s/holochart-components';
import { basicTraces } from '@mk7s/holochart-traces-basic';
register(...basicTraces, ...builtinComponents);
createChart(el, { data: [{ type: 'bar', x: ['a', 'b'], y: [2, 3] }] });Register single modules (register(scatter, bar)) to bundle only those.
Docs
- Chart types: scatter, bar, pie, table
- Attribute reference: scatter, bar, pie, table
- API reference
License
MIT (see LICENSE).
