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);
}
Am I forgeting something?