addCategoryLabelToolTip doesn't seem to work

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
itai.marko
Posts: 10
Joined: Mon Jun 22, 2009 2:42 pm

addCategoryLabelToolTip doesn't seem to work

Post by itai.marko » Mon Jun 29, 2009 1:28 pm

Hi,

I've been trying to add tootips to my category labels but I get no tooltip when I hover the cursor over the category label.
Here's the code that I thought will do the work:

Code: Select all

CategoryPlot plot = chart.getCategoryPlot();
CategoryAxis categoryAxis = plot.getDomainAxis();
CategoryDataset dataset = plot.getDataset();
for (int i=0; i < dataset.getColumnCount(); i++) {
	String categoryName = (String) dataset.getColumnKey(i); 
	categoryAxis.addCategoryLabelToolTip(categoryName, categoryName);
}
The chart was created with ChartFactory.createStackedBarChart() and I'm using 1.0.13.

Am I forgeting something?

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: addCategoryLabelToolTip doesn't seem to work

Post by david.gilbert » Mon Jun 29, 2009 2:13 pm

No, you've found a bug. I just committed this fix which will be included in the 1.0.14 release:

http://jfreechart.svn.sourceforge.net/v ... 96&r2=2176
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked