ember-cli-easypiechart

0.1.2 • Public • Published

Ember-cli-easypiechart

Build Status

An ember-cli addon for using jQuery Easy Pie Chart in Ember applications.

Installation

ember install ember-cli-easypiechart

Usage

{{easy-pie-chart percent=50 symbol="%"}}

The blockless-version will render <span class="percentage">{{percent}}</span>{{symbol}}

inside the component.

Block Version

{{#easy-pie-chart percent=50}}
    <your layout here with {{percent}} & {{symbol}}>
{{/easy-pie-chart}}

All parameters from easy-pie-chart are available. To trigger the plugin's enableAnimation/disableAnimation methods, pass animationOn=true|false to the component and change accordingly.

Animation Callbacks

For example, to have the percent value change incrementally while animation is running:

// {{! app/controllers/application.js}}
 
export default Ember.Controller.extend({
  percent: 0,
    onStep: function(from,to,value) {
        $(this.el).find('span').text(~~value);
  }
});
// {{! app/templates/application.hbs}}
 
{{easy-pie-chart percent=percent animate=true onStep=onStep}}

Testing

  • git clone this repository
  • npm install
  • bower install

Running

Running Tests

  • 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-easypiechart

Weekly Downloads

3

Version

0.1.2

License

MIT

Last publish

Collaborators

  • conormag