What does the tooltip suppose to look like?

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

What does the tooltip suppose to look like?

Post by Haviv Rosh » Mon Jan 13, 2003 10:14 am

HI ,
I have added to my PieChart a tooltip , but I cannot see the different.
Here is the code I have used :

// read the data from the database...
PieDataset data = readData();

// create the chart...
JFreeChart chart = ChartFactory.createPieChart("JDBC Pie Chart Demo", // chart title
data, // data
true // include legend
);

// set the background color for the chart...
chart.setBackgroundPaint(Color.yellow);
PiePlot plot = (PiePlot) chart.getPlot();
plot.setSectionLabelType(PiePlot.NO_LABELS);
plot.setToolTipGenerator(new com.jrefinery.chart.tooltips.StandardPieToolTipGenerator());

//plot.setNoDataMessage("No data available");

// add the chart to a panel...
ChartPanel chartPanel = new ChartPanel(chart);
this.setContentPane(chartPanel);

Thanks...

David Gilbert

Re: What does the tooltip suppose to look like?

Post by David Gilbert » Mon Jan 13, 2003 4:09 pm

If you position the mouse pointer over one of the sections in the pie chart and leave it for half a second or so, a tooltip should appear. When you move the mouse again, it should disappear.

Regards,

Dave Gilbert

Locked