Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we call function in dispatch or emit in dispatch? #155

Open
DigneshGujarathi opened this issue Aug 22, 2018 · 1 comment
Open

Can we call function in dispatch or emit in dispatch? #155

DigneshGujarathi opened this issue Aug 22, 2018 · 1 comment

Comments

@DigneshGujarathi
Copy link

I am trying to get value of onclick pie chart data.
"dispatch": {
elementClick:function(e) {
console.log(e);
this.chartData = e.data;
this.onClickChart.emit('e.data'); //gives error Cannot read property 'emit' of undefined
this.toggle(e.data); //gives error this.toggle is not a function
},

@Anaamika
Copy link

const that = this;
......
......
this.options = {
chart: {
.............
............
"dispatch": {
elementClick:function(e) {
that.onClickChart.emit(e.data);
},
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants