Created
November 1, 2016 12:13
-
-
Save jelhan/e2d9c2b794a64d18201e5bcc03480387 to your computer and use it in GitHub Desktop.
aomran/ember-cli-chart #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
const { computed } = Ember; | |
export default Ember.Controller.extend({ | |
data: computed(function(){ | |
var labels = ["January", "February", "March", "April", "May", "June"]; | |
return { | |
labels: labels, | |
datasets: [ | |
{ | |
label: "My First dataset", | |
fillColor: "rgba(220,220,220,0.2)", | |
strokeColor: "rgba(220,220,220,1)", | |
pointColor: "rgba(220,220,220,1)", | |
pointStrokeColor: "#fff", | |
pointHighlightFill: "#fff", | |
pointHighlightStroke: "rgba(220,220,220,1)", | |
data: [50, 10, 80, 81, 56, 55, 40] | |
}, | |
{ | |
label: "My Second dataset", | |
fillColor: "rgba(151,187,205,0.2)", | |
strokeColor: "rgba(151,187,205,1)", | |
pointColor: "rgba(151,187,205,1)", | |
pointStrokeColor: "#fff", | |
pointHighlightFill: "#fff", | |
pointHighlightStroke: "rgba(151,187,205,1)", | |
data: [28, 48, 40, 19, 86, 27, 90] | |
} | |
] | |
}; | |
}), | |
isBarChart: computed.equal('type', 'bar'), | |
isLineChart: computed.equal('type', 'line'), | |
type: 'line' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.10.6", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.6.0", | |
"ember-template-compiler": "2.6.0", | |
"ember-testing": "2.6.0" | |
}, | |
"addons": { | |
"ember-cli-chartjs": "*" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment