npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

ember-d3-modifiers

v2.0.4

Published

This is an EmberJS addon to provide some simple D3 visualizations/charts in an EmberJS application via modifiers

Readme

ember-d3-modifiers

This is an Ember modifier that lets you render a D3 document/graph/chart for some common chart types.

(This modifier currently leverages D3 v5 under the hood)

Compatibility

  • Ember.js v3.28 or above
  • Ember CLI v3.28 or above
  • Node.js v18 or above

Installation

ember install ember-d3-modifiers

Demos

There are several demos available in this repository you can use for reference in addition to the documentation found here.

To view these demos:

  1. Clone a local instance of this repository to your local machine
  2. Change directory to where that local cloned instance resides
  3. npm install to download all needed dependencies
  4. ember s
  5. Open http://localhost:4200 in your browser

Usage (time series)

An example implementation for this modifier:

<div {{d3-time-series
  chartData=this.chartData
  d3Config=this.d3Config}}>
</div>

chartData parameter

This is a required parameter. It should contain an array of objects that contain the below 3 parameters

  1. seriesId (An identifier for the source of this data)
  2. date
  3. value
[
  { "seriesId": "Sensor A", "date": "2020-07-13T17:00:00.000Z", "value": 3 },
  { "seriesId": "Sensor B", "date": "2020-07-13T17:00:00.000Z", "value": 3 },
  { "seriesId": "Sensor A", "date": "2020-07-13T17:01:00.000Z", "value": 4 },
  { "seriesId": "Sensor B", "date": "2020-07-13T17:01:00.000Z", "value": 2 }
]

d3Config parameter

This is an optional parameter to inform the modifier on how the resulting D3 chart should be rendered. Below is the basic layout of the configuration if you were provide one of your own.

If you are wanting the D3 chart to render with different configuration values you only need to provide an object with only those specific overriding values. The properties you omit will use the defaults.

var d3Config = {
  layout: {}, // The size of the D3 chart along with margin settings
  dataConfig: {}, // A hash for each seriesId and it's configuration
  genericDataConfig: {}, // A generic configuration for the data being presented (fallback for dataConfig)
  thresholds: [], // An array of thresholds that need to be presented
  axis: {
    x: {}, // x Axis configuration settings
    y: {}, // y Axis configuration settings
  },
  legend: {}, // Settings for if and where the legend should be rendered
  tooltip: {}, // Settings for the tooltip features this modifier provides
};

More details on the lower level properties of d3Config can be found at the location below: https://github.com/cah-johnryan/ember-d3-modifiers/blob/master/addon/objects/d3-config-constants.js

TODO

  1. Bar chart with multiple series
  2. More documentation on the d3Config in the dummy application.
  3. More examples of the generic series

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.