Skip to content

veelci/ember-cli-chart

 
 

Repository files navigation

Ember Chart

Build Status

This is an Ember CLI addon for adding a ChartJS component. This addon is tested on Ember-CLI v1.13.1 and uses the ember-try addon to test against Ember release, beta and canary.

Installation

$ ember install ember-cli-chart

Usage

In your handlebars template just do:

{{ember-chart type=CHARTTYPE data=CHARTDATA options=CHARTOPTIONS width=CHARTWIDTH height=CHARTHEIGHT legend=LEGEND}}
  • CHARTTYPE: String; one of the following -- Line, Bar, Radar, PolarArea, Pie or Doughnut.
  • CHARTDATA: Array; refer to the ChartJS documentation
  • CHARTOPTIONS: Object; refer to the ChartJS documentation. This is optional.
  • CHARTWIDTH: Number; pixel width of the canvas element
  • CHARTHEIGHT: Number; pixel height of the canvas element
  • LEGEND: Boolean, true means add a legend. This is optional.

Example

{{ember-chart type='Pie' data=model.chartData width=200 height=200}}

Example with Legend

{{ember-chart type='Line' data=model.chartData width=200 height=200 legend=true}}

More Resources

About

A simple ember component for adding Charts

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 90.0%
  • HTML 9.9%
  • CSS 0.1%