This Ember CLI addon is a simple wrapper for ChartJS (v2.9).
- Ember.js v3.12 or above
- Ember CLI v2.13 or above
- Node.js v10 or above
$ ember install ember-cli-chart
In your handlebars template just do:
- CHARTTYPE: String; one of the following --
line
,bar
,radar
,polarArea
,pie
ordoughnut
. - 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. Only applies if the chart is NOT responsive.
- CHARTHEIGHT: Number; pixel height of the canvas element. Only applies if the chart is NOT responsive.
- CHARTPLUGINS: Array; refer to ChartJS documentaion. This is optional.
- CUSTOMLEGENDELEMENT: HTMLElement; A custom element to put a custom legend in, when using
legendCallback
. This is optional.
{{ember-chart type='pie' data=model.chartData width=200 height=200}}