خرید بک لینک

Vote count: 0

I am trying to edit the options for displaying a chart using ember-cli-chart.

Here is my code:

// hbs template
{{ember-chart type="Line" data=joueyData options=lineOptions height=100 width=400}}

// route
joueyData: Ember.computed('model.jouey', function(){
    retu {
        labels: this.get('model.jouey').mapBy('date'),
        datasets: [{
            label: "Emissions",
            fill:false,
            tension: 0,
            fillColor: "rgba(0,0,0,0)",
            strokeColor: "#4caf50",
            data: this.get('model.jouey').mapBy('emissions'),
        }]
    }
}),
lineOptions: {
    scales: {
        yAxes: [{
            ticks: {
                max: 5,
                min: 0,
                stepSize: 0.5,
                beginAtZero: true
            }
        }]
    },
    responsive: true,
    maintainAspectRatio: true,
}

This is set out as the documentation says but none of the options under 'scales' are working. The responsive and maintainAspectRatio options work.

Have I put it in the correct place?

asked 6 mins ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 27 خرداد 1395 ساعت: 21:03

صفحه بندی