Socket
Socket
Sign inDemoInstall

ember-cli-d3-shape

Package Overview
Dependencies
231
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ember-cli-d3-shape

Data-Driven Documents for Ember


Version published
Maintainers
1
Install size
27.4 MB
Created

Readme

Source

ember-cli-d3-shape

Build Status Ember Observer Score npm version Dependency Status devDependency Status

ember-cli-d3-shape is a shim for D3 4.x, loaded from NPM as ES6 modules. It includes d3-shape and all version 4 modules in D3 4.x.


D3 Shape is a set of primitives for building complex data visualisations. Because it depends on all the other components of D3, this package also provides all other D3 v4.0 packages (see below for a list).

This addon is just a shim, if you're looking for a more high level visualisation addon, check out maximum-plaid.

Each package is 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. For example, 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';

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.

Installation & Usage

Install this like any other Ember Addon:

ember install ember-cli-d3-shape

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.plot = select(this.element.querySelector('svg'));
  },

  didRender() {
    // NOTE: Do things with the DOM after it has rendered.
    this.plot.append('rect').attr('fill', '#15CD72');
  }
});

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/.

Keywords

FAQs

Last updated on 19 Jul 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc