vega-node
v0.1.0
Published
Show interactive vega visualizations from nodejs.
Downloads
4
Maintainers
Readme
Vega node
Show interactive vega visualizations from nodejs.
Usage
import { vegaLite } from "vega-node";
await vegaLite({
title: "Simple bar chart",
spec: {
data: {
values: [
{ a: 'A', b: 28 },
{ a: 'B', b: 55 },
{ a: 'C', b: 43 }
]
},
mark: 'bar',
encoding: {
x: { field: 'a', type: 'ordinal' },
y: { field: 'b', type: 'quantitative' }
},
}
});
Examples
$ npm run example -- examples/SimpleBarChart.ts
$ npm run example -- examples/Interactive.ts