I’m trying to make a onClick handler function in chart.js which returns the label of the bar clicked in. I’m aware of the funciton .getElementsAtEventForMode
but it requires for you to have the chart’s name. This is a problem because I’m using components and am not calling the chart directly so all the graphs have the same name. I was wandering if there was a way to call this function using perhaps the component’s vue.js id.
Thank you in advance!