Reputation: 31
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.
Upvotes: 1
Views: 723
Reputation: 205775
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.
Upvotes: 1