I am trying to create a simple d-3 bar-chart in Ember and am getting the following errors:
12:3) Only string, number, symbol, boolean, null and undefined... are allowed as default properties
15:22) Do no use jQuery - this after I installed the optional features, including jQuery
Any help would be appreciated
import Component from '@ember/component';
import { select } from 'd3-selection';
export default Component.extend({
// Initial values
num_sent: [{quarter: '2001-03-31', count: 39}, {quarter: '2001-06-30', count: 66}, {quarter: '2001-09-30', count: 63}, {quarter: '2001-12-31', count: 68}],
didInsertElement() {
let svg = select(this.$('svg')[0]);
svg.selectAll('rect').data(this.get('num_sent'))
.enter()
.append('rect')
.attr('width', 20)
.attr('height', num_sent => num_sent.count)
.attr('x', (num_sent, index) => 25 * index);
}
});```
Aucun commentaire:
Enregistrer un commentaire