tags:

views:

39

answers:

1

Hi,

I have a XYPlot in JFree Chart with origin at (0,0).Now user clicks on anywhere in the chart.On clicking I want to draw a line from the origin to the coordinate point and extend the line till the end of the chart.

Please suggest!

I am new to Jfreechart and required this solution urgently.

Thanks in advance!

Sanjoy

A: 

One approach is to override mousePressed() to get the coordinates and override drawSecondaryPass() to draw the line.

trashgod