0
votes

currently i am using chartjs to generate chart data for 12 countries.

i have date for 12 countries in Line Chart. but the problem is that i cannot get country details when i hover over the points. Instead i get x and y axis values which are time and (sum) on y axis. how could i get data about country when i hover.

also if clicked on certain point i should get that data on click. supposes i hovered on england and cliecked on it i should get a alert box containing england data only.

is there any solution to it in chartjs

1
I believe stackoverflow.com/questions/30334965/… is what you are looking for in terms of having the country label show up. About your second point - I'm not sure that's easily possible - logically, how would handle the case where 2 countries' points overlap?potatopeelings

1 Answers

0
votes

The second point's functionality has been added in the ChartJS v2 beta if you're still having problems. As for the first point I don't think that's easily possible unless you're just wanting what country/dataset it is.