Pie chart - How to disable tooltips?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
efratb
Posts: 7
Joined: Wed Mar 22, 2006 7:11 pm

Pie chart - How to disable tooltips?

Post by efratb » Mon Sep 25, 2006 9:49 am

Hi,

I have a pie chart, and the tooltips are generated automatically.
I tried to remove then in many ways, but none of them works:

When create the chart:

Code: Select all

JFreeChart chart = 
        	ChartFactory.createPieChart("", dataset, true, false, false);
Setting the plot's tootip generator:

Code: Select all

plot = (PiePlot) chart.getPlot();
plot.setToolTipGenerator(null);
or after creating the chart:

Code: Select all

chart = createChart(createDataset());
chartPanel = new ChartPanel(chart);
((ChartPanel)chartPanel).setDisplayToolTips(false);
As I said, nothing works, and I still have the tooltips.
How can I remove it?

Thanks a lot,
Efrat

Locked