0.1.0 • Published 2 years ago

vega-node v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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