DEPRECATED
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.
import {mean, ascending} from "d3-arrays";
export default Ember.Service.extend({
values: [],
meanValues: Ember.computed('values.[]', function() {
return mean(this.get('values').sort(ascending));
}),
});
ember install ember-d3-arrays-shim
Full API documentation is available on the actual D3-Arrays repository.
MIT