krispo / ng2-nvd3

Angular2 component for nvd3
http://krispo.github.io/ng2-nvd3/
MIT License
328 stars 104 forks source link

Cannot output data to another component using angular 2 custom event @Output() #146

Open eeshamkohli opened 6 years ago

eeshamkohli commented 6 years ago

Hi, I cannot output data on click of pie chart. callback: function (chart) { chart.pie.dispatch.on('elementClick', function (e) { console.log(e.data); this.chartData.emit(e.data); });

chartData variable is an @output event emitter object, but on clicking pie chart, i get value in console, but it says cannot read emit property of undefined.

Kindly help