Search code examples
javaswingchartsgraphjfreechart

jfreechart time series chart with events


I am using jfreechart (specially ChartFactory.createTimeSeriesChart()). Is there a way to signal events like Google Finance charts, see the A, B, C etc on the right and in the chart.

google finance charts


Solution

  • I don't see a way to do this easily. One possibility would be to place an [XYPointerAnnotaion][1] (example here) on your chart, then create the legend on the right separately. You'd have to manage the mapping between the pointers on the chart and the entries in the legend yourself though.