ember-cli-chartist
Advanced tools
Comparing version 0.0.5 to 0.1.1
{ | ||
"name": "ember-cli-chartist", | ||
"version": "0.0.5", | ||
"version": "0.1.1", | ||
"description": "Ember CLI Addon for Chartist.js", | ||
@@ -5,0 +5,0 @@ "directories": { |
@@ -11,3 +11,3 @@ # Chartist.js for Ember-CLI Projects | ||
``` | ||
npm install --save ember-cli-chartist | ||
npm install ember-cli-chartist --save-dev | ||
``` | ||
@@ -65,2 +65,36 @@ | ||
### Chart configuration | ||
Chartist charts have a whole bunch of cool configuration options. You can pass those to the `chartist-chart` components with the `options` attribute. You'll need to create the options object in a similar way as you do for the `data` attribute object. | ||
``` | ||
{{chartist-chart options=chartOptions data=model.chartData}} | ||
``` | ||
*/app/routes/application.js* | ||
```javascript | ||
import Ember from 'ember'; | ||
export default Ember.Route.extend({ | ||
model: function () { | ||
return { | ||
chartData: { | ||
... | ||
}, | ||
chartOptions: { | ||
showArea: true, | ||
lineSmooth: false, | ||
axisX: { | ||
showGrid: false | ||
} | ||
} | ||
} | ||
} | ||
}); | ||
``` | ||
See the [Chartist docs](http://gionkunz.github.io/chartist-js/api-documentation.html) for all available config options. There's bunch of good-uns! | ||
### Custom CSS | ||
@@ -67,0 +101,0 @@ |
143193
147