ember-cli-chart

by aomran

A simple ember component for adding Charts

131 Stars 66 Forks Last release: about 2 months ago (v3.7.2) MIT License 167 Commits 17 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Ember Chart

Build Status Ember Observer Score

This Ember CLI addon is a simple wrapper for ChartJS (v2.9).

Compatibility

  • Ember.js v3.12 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

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
  plugins=CHARTPLUGINS
  customLegendElement=CUSTOMLEGENDELEMENT
}}
  • 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. 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.

Example

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

More Resources

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.