Given an xy plot and a mouse click, how do I find out which point(s) are in a certain area around the click point? This is often know known as hit-testing and is related to my earlier question about which area an xy plot point occupies on the chart.
More generally, the manual seems to have nothing to say on the topic of user interaction with chart widgets. It would be useful to add a section on that.
Hit testing
I don't think there is such an automation in JFreeChart. Of course you could find out the coordinates of the event, transform the coordinates to real values and find out the nearest data by yourself.
But the common method is to trigger an action when the user clicks exactly on a data-item. This should be easy.
But the common method is to trigger an action when the user clicks exactly on a data-item. This should be easy.