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...
What does the tooltip suppose to look like?
Re: What does the tooltip suppose to look like?
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
Regards,
Dave Gilbert