d3-gauge-writable

0.1.1 • Public • Published

d3-gauge-writable

testling badge

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

Readme

Keywords

none

Package Sidebar

Install

npm i d3-gauge-writable

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • thlorenz