d3-process-control

0.1.1 • Public • Published

d3-process-control

Greenkeeper badge build status

d3 utility to apply nelsons rules of process control to a set of data.

Installing

If you use NPM, npm install d3-process-control. Otherwise, download the latest release.

API Example

var data = [{
  name: 'foo',
  val: 3
} ...];
 
var control = d3.d3_process_control()
  .std(5)
  .mean(1)
  .rule({
    'gt_one_std': {
      size: 1,
      rule: function(data, mean, std) {
        // data is an array of size (1 in this case)
        // returning true marks the data point with the attribute gt_one_std
        return (data[0] - mean) > std;
      }
    }
  })
  .value(function(d) { return d.val; });
 
svg.selectAll('rect')
  .data(data)
  .enter()
  ...
  .call(control);

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i d3-process-control

Weekly Downloads

2

Version

0.1.1

License

MIT

Last publish

Collaborators

  • kiernan