GithubHelp home page GithubHelp logo

netes / ember-d3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ivanvanderbyl/ember-d3

0.0 1.0 0.0 60 KB

Ember CLI addon to include D3 as an ES2015 module in your app.

License: MIT License

JavaScript 93.33% HTML 6.67%

ember-d3's Introduction

ember-d3 Build Status Ember Observer Score npm version Dependency Status devDependency Status

Ember shim for loading [email protected]. To install:

ember install ember-d3

Important: You must be using NPM >= 3.0 and Node >= 4.0 for this to work,
or you'll get errors when you start your app. Check by running npm version.

You can upgrade NPM by running:

npm i -g npm@3

D3 modules are loaded from NPM as ES2015 modules. It includes d3-shape and all version 4 modules in D3 4.x.

If you're looking for the ember-d3 for [email protected], see the v3 branch.

Advanced Installation

If you need a specified d3 version, add this to your project:

npm install --save-dev [email protected]

Example usage:

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

We've put together a complete demo component which you can use to really get a feel for how to use the different packages provided by this addon.

Specifying the d3 version

This addon is simply a loader for the d3 NPM package. If you would like to specify a specific version on the d3 v4.x track, you can do so by installing that version directly in your project, and this addon will load that version.

Svelte Builds

In case you do not want to include all of d3's dependencies, you may whitelist the packages that you want to include in your project's config/environment.js file.

For example, if you only wanted to use d3-scale, you would do:

// config/environment.js
module.exports = function() {
  return {
    'ember-d3': {
      only: ['d3-scale']
    }
  };
};

Or if you want to exclude a package:

// config/environment.js
module.exports = function() {
  return {
    'ember-d3': {
      except: ['d3-scale']
    }
  };
};

Note: Even though you only add d3-scale, it has a few transitive d3 dependencies. These are added to your project automatically.

Running Tests

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.