Skip to content
Advertisement

Chart.js 2.7.2- Multiline get point value onClick

I would like to get value foreach point value. Don’t work because when I click on point I obtain only of the first line value. GetElementsAtEvent give me an array of 3 element (element active) but how I can get the clicked value?

This the Complete code.

JavaScript

Thanks

Advertisement

Answer

To get the exact element, use ctx.getElementAtEvent.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement