d3-gauge-writable
v0.1.1
Published
d3 gauge with a writable stream API so you can pipe into it.
Downloads
8
Readme
d3-gauge-writable
d3-gauge with a writable stream API so you can pipe into it.
var gaugeWritable = require('d3-gauge-writable')
, numbers = require('./number-readable')
numbers({ to: 40, throttle: 500 })
.pipe(gaugeWritable(el, { gauge: gaugeOpts }))
Note: please make sure to include the appropriate css
in your page, otherwise all you'll see is a
big black circle.
Installation
npm install d3-gauge-writable
API
###function GaugeWritable (el, opts)
Creates a writable stream that writes to a d3-gauge.
@name GaugeWritable @function params:
- el DOMElement to attach the gauge to
- opts Object passed to the Writable
- gauge: property on the opts Object passed to d3-gauge
returns:
Stream a writable stream
Please review the example as well.
License
MIT