Hi I have a Line chart within a scrollpane. I've written a mousemoved event for the chart so that when I move the mouse over the chart, I should be able to get the X & Y values of the chart, not the position of the of the mouse when it is moved over the chart. Right now, the values that are shown when I move the mouse over the chart are the values of the X, Y coords of the mousemoved event wrt the scrollpane. Can someone throw some light on this ?!! Thanks Meghna
Hi Meghna, I am a little confused with your question. If you have a canvas inside of a scrollpane and you have added a mouse listener to the canvas you get the X and Y related to the canvas. If we should happen to move the scrollpane we still get the x,y of the canvas. If you have a smaller area on the canvas that you are calling a chart then you have to make the math adjustment to figure out the chart x,y ... Manfred.
Hi Manfred The basic container here is the Applet. And then, there's the scrollpane in which the chart is contained. Now, suppose, the chart looks like this :
5 4 3 .(3,4.1) 2 1 .(1,1) 0 1 2 3 4 5 How do I retrieve the math for this particular problem ?!! I don't seem to come up with any logic. Please let me know if you've come across any solution for a similar situation. I'd greatly appreciate that.
Meghna: much better I guess... Also can I ask you to post the link for the JChart you have been talking about. Sorry, I couldn't find time to search. Just curious to know, - satya