0.0.4 • Published 9 years ago

ember-d3-arrays-shim v0.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

Ember D3 Arrays shim

D3.js version 4.x is written in ES2015 compatible code, but ember CLI cannot natively load this module. This shim loads the D3 Array source tree so you can use specific functions from D3 Arrays without loading the entire D3 library.

Usage (In your Ember CLI app)

import {mean, ascending} from "d3-arrays";

export default Ember.Service.extend({
  values: [],

  meanValues: Ember.computed('values.[]', function() {
    return mean(this.get('values').sort(ascending));
  }),
});

Installation

ember install ember-d3-arrays-shim

Documentation

Full API documentation is available on the actual D3-Arrays repository.

License

MIT