This package has been deprecated

Author message:

WARNING: ember-cli-d3-primitive has been renamed ember-cli-d3-shape

ember-cli-d3-primitive

0.4.1 • Public • Published

ember-cli-d3-primitive

Sample Donut Chart

This addon provides a version of D3 based on the new v4 code branches at https://github.com/d3.

Each package is compiled and importable as per the D3 documentation for each package. This also means that you don't need to import the entire d3.js build into your App if you only need a function or two. Check out d3-array for an extensive library of useful Array functions not natively found in Javascript.

Example usage:

import { line } from 'd3-shape';
import { scaleOrdinal } from 'd3-scale';
import { extent } from 'd3-array';

Or check out the Donut chart implementation in the dummy app.

Included D3 modules:

This addon will be updated when new releases are cut of these packages. Currently none of these are 1.0 stable, so some of your code might break by upgrading. It is recommended that you have solid tests in place.

Build Status

Installation & Usage

Install this like any other Ember Addon:

ember install ember-cli-d3-primitive

Then import what you need from each module:

import { curveCardinalOpen } from  'd3-shape';
import { select } from 'd3-selection';
 
export default Ember.Component.extend({
  didInsertElement() {
    this.chart = select(this.element.querySelector('svg'));
  }
});

Running

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

Package Sidebar

Install

npm i ember-cli-d3-primitive

Weekly Downloads

1

Version

0.4.1

License

MIT

Last publish

Collaborators

  • ivanvanderbyl