FVANCOP / ChartNew.js

MIT License
420 stars 143 forks source link

Clickable lines and shapes on chart #486

Open luna2761 opened 7 years ago

luna2761 commented 7 years ago

Hello, Francois!

I have a question concerning line charts. Is it possible to choose a line (created via datasets with xPos option) on chart by clicking it and call some action? For example, after clicking on some line, it will be highlighted and there will appear a window with information about its points or anything else. And is it possible additionally to make the same for shapes (created via shapesInChart)?

Thank you.

FVANCOP commented 7 years ago

Hi,

Selecting a point on a line (with or without xPos) and performing actions according the selected point is possible and not too difficule. A new Sample has been added - see Samples\issue_0486.html.

Unfortunately, it is not possible to perform actions on shapes drawn through shapesInChart; Only on text drawn by the shapesInChart module (see Samples/clicktextwithmouse.html)

Regards, François

luna2761 commented 7 years ago

Thank you for the answer. Seems to work fine. Will be waiting for opportunity to perform actions on shapes drawn through shapesInChart :)).

Thank you.