node-d3
v0.1.6
Published
d3js for nodejs
Downloads
4
Readme
node-d3
Server-side D3 & Plot
Installation
❯ npm install node-d3 --save
or
❯ yarn add node-d3
Usage
const { Plot , drawer } = require('node-d3')
const chart = drawer(createSVG(500,500))
chart.append('circle').attr('cx',250).attr('cy',250).attr('r',100).attr('fill','#ccc')
console.log(chart.toSVGString())
const { Plot,drawer } = require('node-d3')
const chart = drawer(Plot.plot({
marks: [Plot.barY(alphabet, { x: 'letter', y: 'frequency' })],
}));
console.log(chart.toSVGString())