https://stackblitz.com/edit/ng2-chart-example
here is working example in js : https://jsfiddle.net/edicarlos10/35081nag/
I want to use this code in my project but am not able to find, how can I use this code.
the working example is done by using chart.js and I want to make it done using ng2-charts, You can see in working example the tooltip is moveable on mouse position, I want to implement in angular project.
Chart.Tooltip.positioners.cursor = function(chartElements, coordinates) {
return coordinates;
};
you need to import Chart from chart.js
then you can use it in constructor
and put it in options with name 'cursor'