Vertical line - time mark

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Fred Rolland

Vertical line - time mark

Post by Fred Rolland » Wed Dec 12, 2001 2:23 pm

HI

Is there a possiblity to draw a vertical line with some label to mark a certain time in a time series graph?
For example on a stock graph to show that on a specific day an event happened ( like a new product anouncement ) that may explain some behaviour of the graph.

David Gilbert

RE: Vertical line - time mark

Post by David Gilbert » Thu Dec 13, 2001 10:32 am

Hi Fred,

Another developer added a method addVerticalLine(...) to the XYPlot class. I think it will give you the line at least. You would have to modify the code to get a label though.

A while back I was talking with a developer about putting together a general chart annotation mechanism so that labels could be added to charts at points of interest. I think that is a good idea, although it's not being worked on at present.

Regards,

Dave Gilbert

Fred Rolland

RE: Vertical line - time mark

Post by Fred Rolland » Thu Dec 13, 2001 1:15 pm

Thanks Dave for your answer and your great code!!!

Locked