0

enter image description here

need to select xaxis data .. for example if i select Jul 15 the Jul15 value should get..

exampleenter image description here

is there any solution for this requirement, please..?

  • Have you tried [getElementsAtEvent](https://www.chartjs.org/docs/latest/developers/api.html#getelementsatevente)? – M0nst3R Jun 19 '20 at 09:05
  • @GhassenLouhaichi L --- i've tried .. it only get the values .. but i need to draw a line like the above graph.. is that possible – Sanjai Kumar Jun 19 '20 at 13:11
  • Oh I see, so you want a crosshair that moves with your cursor, is that it? And does it move with the cursor or do you want it to appear only on click? – M0nst3R Jun 19 '20 at 13:15
  • i want to appear only on click – Sanjai Kumar Jun 19 '20 at 14:04
  • when click on labels and data – Sanjai Kumar Jun 19 '20 at 14:13
  • do you know any solutions for it... kindly please tell me if you have any ..! @GhassenLouhaichi – Sanjai Kumar Jun 19 '20 at 14:59
  • I am looking through the documentation but cannot find anything, the only thing I found is this plugin: [chartjs-plugin-crosshair](https://www.npmjs.com/package/chartjs-plugin-crosshair), but it seems to work on hover, not on click. – M0nst3R Jun 19 '20 at 15:02

0 Answers0