VizJar is a JavaScript plotting library for the web, designed to simplify the process of creating visualizations. It follows a declarative approach and is rooted in the principles of the Grammar of Graphics, making it intuitive and powerful for users of all levels.
We are working on a playground app that you can use to try vizjar.
You can add it to your project using YARN or NPM:
## Install using NPM
$ npm install --save vizjar
## Install using YARN
$ yarn add vizjarimport viz from "vizjar";
// 1. Get the element where the plot will be displayed
const parent = document.getElementById("root");
// 2. Create your plot
const data = [1, 5, 2, 3, 9, 5, 6, 3, 4];
const plot = viz.plot({
width: 600,
height: 400,
margin: 50,
grid: true,
x: {
scale: "linear",
domain: [0, data.length - 1]
},
y: {
scale: "linear",
domain: [0, 10],
},
geoms: [
viz.geom.curve(data, {x: (d, i) => i, y: d => d}),
],
});
// 3. Display your plot
parent.appendChild(plot);This is still a work in progress.
This project is licensed under the MIT License - see the LICENSE file for details.