1

I'm trying to add a tooltip for the live (serial) data using a timeseries plot. However, the tooltip doesn't show up, so I'm not sure what is the problem and how I could fix it? Please suggest a way to solve this issue.

Yoo
  • 31
  • 4

1 Answers1

1

Enable tooltips in your chosen ChartFactory. TimeSeriesChartDemo1, included in the distribution, is a complete example. From the source,

    JFreeChart chart = ChartFactory.createTimeSeriesChart(
        "Legal & General Unit Trust Prices",  // title
        "Date",             // x-axis label
        "Price Per Unit",   // y-axis label
        dataset
    );

note that ChartFactory.createTimeSeriesChart() enables tooltips by by default.

If needed, create a custom XYToolTipGenerator, as shown here.

trashgod
  • 203,806
  • 29
  • 246
  • 1,045