I am trying to use plotly java script click event in angular 2 project but it is returning the below error
Property 'on' does not exist on type 'HTMLElement'.
let myPlot = document.getElementById('donutChartId');
myPlot.on('plotly_click', function(data){
console.log(data.points[0].label);
});
Angular build is failing because of this.