jeudi 3 décembre 2015

Issue with passing component "this" context in ember to kendo seriesClick event [duplicate]

This question already has an answer here:

I am trying to pass ember component "this" context to kendo chart seriesClick event, but getting error this.sendAction is not a function.Below is my code

import Ember from 'ember';

export default Ember.Component.extend({

chartConfig: {
            title : "Global Trade Volume",
    categoryAxis: [{
        field: "product",
        labels: {
            color: "black",
            rotation: 325
        }
    }],
    series: [{
        field: "value"
    }],
    chartArea: {
        width: 500,
        height: 250
    },
     seriesClick : function(e){
     alert('Here we can fetch details form WS and will pass the value:' + e.value);
     //this.updateChart();
    // debugger;
     this.sendAction('globalReportChartClickAction', e); // getting error here.

    }.bind(this)
},

// updateChart () {

// }

});

I also find sender message in templete like {{fm-global-report-chart chartData= model.globalData globalReportChartClickAction=globalReportChartClick}}

same error getting for this.update function.




Aucun commentaire:

Enregistrer un commentaire