@mk7s/holochart-traces-sci
v0.1.0-alpha.0
Published
Scientific trace types: heatmap, contour, image, scatterpolar, barpolar.
Maintainers
Readme
@mk7s/holochart-traces-sci
The scientific trace types of Holochart: heatmap, contour, image, and the polar
scatterpolar and barpolar with their polar subplot. 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-sci@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
sciTraces: every trace module below plus the polar subplot, to register at once- Trace modules:
heatmap,contour,image,scatterpolar,barpolar - Polar subplot:
polarComponent(drawslayout.polaraxes; needed by the polar traces),polarAttributes - Attribute schemas (experimental):
heatmapAttributes,contourAttributes,imageAttributes,scatterpolarAttributes,barpolarAttributes
Usage
import { createChart, register } from '@mk7s/holochart-runtime';
import { builtinComponents } from '@mk7s/holochart-components';
import { sciTraces } from '@mk7s/holochart-traces-sci';
register(...sciTraces, ...builtinComponents);
createChart(el, {
data: [
{
type: 'heatmap',
z: [
[1, 2],
[3, 4],
],
colorscale: 'Viridis',
},
],
});Docs
- Chart types: heatmap, contour, polar
- Attribute reference: heatmap, contour, scatterpolar
- Colors, colorscales & colorbars
- API reference
License
MIT (see LICENSE).
