I am trying to implement a timeseries chart with a peculiar requirement in JFreeChart. I can draw the chart, but I don't know how to implement the vertical red line at the last value in the chart. It should always be in the same spot and should always intersect with the last value.
I am absolutely out of ideas on how this would be done. I was thinking that it might be possible to implement it as a static gridline, but I don't know how to specify one.
Also, the size of the charts will be static, so some roundabout way of doing this is acceptable, hopefully without introducing any 3rd party libraries.
An image of what I am trying to achieve can be found here.
Thanks.
Well, I solved it using a marker. Here's the code that does it:
Maybe someone else will find this useful.
I'd just set a custom cross-hair on the last domain value: