0π
β
To whoever may be interested β I ended up digesting the chart.js code and writing some custom functions within my Angular 2 files to take the event and extract the data (by detecting the mouse position and seeing what items were clicked on, etc).
If anyone needs any help or insight, please let me know and Iβll be happy to provide
0π
This is probably another issue, but where is e coming from? Itβs weird for the myNewChart.getElementsAtEvent(e) call to be floating around without being inside some sort of callback like
myChart.onclick = function(e){
var points = myChart.getElementsAtEvent(e)
}
Also is your new Chart definitely a chart.js Chart object and not something else? Iβve never used ng2-charts but does it provide itβs own Chart object thatβs missing this method?
Source:stackexchange.com