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 🙏

© 2026 – Pkg Stats / Ryan Hefner

ember-cli-echarts

v0.1.8

Published

Ember addon for Baidu's echarts.

Readme

Ember CLI echarts

Ember Version Build Status npm version Download Total

An EmberJS echarts wrapper

Installation

ember install ember-cli-echarts

echarts Documentation

Before using this addon, you might want to checkout the echarts docs

Usage | Examples


Basic Usage

All you need to get started is to pass in the data it should display via the option parameter.

{{echarts-chart option=option}}

Options

Chart Options

All chart specific options can be specified via the option parameter.

// Basic area chart
option = {
    xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        data: [820, 932, 901, 934, 1290, 1330, 1320],
        type: 'line',
        areaStyle: {}
    }]
};
{{echarts-chart option=option}}

Example


Events

Echarts events API

onEvents: {
    click(param, echart) {
      console.log(param, echart);
      alert('chart clicked');
    },
    legendselectchanged(param, echart){
      console.log(param, echart);
      alert('chart legendselectchanged');
    }
  }
{{echarts-chart option=option onEvents=onEvents}}

Example


Loading

Echarts showLoading API

_t: null,

loadingOptions: {
  text: '加载中...',
  color: '#4413c2',
  textColor: '#270240',
  maskColor: 'rgba(194, 88, 86, 0.3)',
  zlevel: 0
},

onChartReady(chart) {
  set(this, '_t', setTimeout(() => {
    chart.hideLoading();
  }, 3000));
},
{{echarts-chart
  option=option
  onChartReady=(action onChartReady)
  loadingOptions=loadingOptions
  showLoading=true
}}

Example


Themes

Custom theme

init() {
  this._super(...arguments);
  this.registerTheme();
  set(this, 'theme', 'my_theme');
},
  
registerTheme() {
  const colorPalette = [
    '#c12e34','#e6b600','#0098d9','#2b821d',
    '#005eaa','#339ca8','#cda819','#32a487'
  ];

  echarts.registerTheme('my_theme', {
    "color": colorPalette,
    "title": {
      "left": "center",
      "y": "10",
      "textStyle": {
        "color": "#fff"
      },
    },
    legend: {
      "textStyle": {
        "color": "#fff"
      },
    },
    "backgroundColor": "#1c2e40",
  });
}

Echarts Dark theme

init() {
  this._super(...arguments);
  // echart default themes
  set(this, 'theme', 'dark');
}
{{echarts-chart
  option=option
  theme=theme
}}

Example


Additional Config

Echarts init API

opts: {
  devicePixelRatio: 1,
  renderer: 'svg' // canvas of svg
  width: '500px',
  height: '500px'
}
{{echarts-chart
  option=option
  opts=opts
}}

Helper Actions

Currently there are two helper actions provided:

1. beforeSetup

This is called before echarts has been initialized.

beforeSetup(context, chart) {}
{{echarts-chart option=option beforeSetup=(action beforeSetup)}}

2. afterSetup

This is called after all chart options and data have been set, as well as after the chart has been created.

afterSetup(context, chart) {}
{{echarts-chart option=option afterSetup=(action afterSetup)}}

Looking for help?

If it is a bug please open an issue on GitHub.

Want to help?

Installation

  • git clone this repository
  • npm install
  • bower install

Running

  • ember server
  • Visit your app at http://localhost:4200.

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

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

Shout-out to @offirgolan as a lot of this was inspired by: ember-cli-nvd3 :pizza: :pizza: