[jFreeChart] Converting screen-points to points, which are relative to the axis
I'm playing a bit around with jFreeChart. What I would like to do is, to klick onto the graph and get the coordinates (within the graph), which i klicked on.
I found the method mouseClicked(MouseEvent e) within the ChartPanel Class.
e.getX() gives me a number relative to the window.
Now i searched around and tried many ways to, from there, get the coordinates i clicked on. Anyways, I was not able to find a method which suited that propose.
There exists a method called translateScreenToJava2D(Point p), which sounds just like what I'm saerching for, but it does not return the wished value.
Do you have a suggestion for me, which way I could use?