Gantt Chart - Explicitly Setting Task Label

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
POruganti
Posts: 10
Joined: Tue May 08, 2007 1:09 pm
Location: LONDON

Gantt Chart - Explicitly Setting Task Label

Post by POruganti » Thu May 17, 2007 6:24 pm

Hi,

I am creating a Gantt Chart.
I create a task with some description.
But while GanttRenderer renders the chart, i want to manipulate the task description and I want the chart to get created with the new Task description that i manipulate.
I checked the GanttRenderer source.

Its having the below code.
So I tried to edit dataset.getColumnKey(column) value. but its not having any effect on the chart.

Even after commenting out this code, there is no change in the chart.

Please let me know how can I change the task description that gets displayed on the chart in GanttRenderer.

CategoryItemLabelGenerator generator = getItemLabelGenerator(row,
column);

if (generator != null && isItemLabelVisible(row, column)) {
drawItemLabel(g2, dataset, row, column, plot, generator, bar,
false);
}

// collect entity and tool tip information...
if (state.getInfo() != null) {
EntityCollection entities = state.getEntityCollection();

if (entities != null) {
String tip = null;
CategoryToolTipGenerator tipster = getToolTipGenerator(row,
column);
if (tipster != null) {
tip = tipster.generateToolTip(dataset, row, column);
}
String url = null;
if (getItemURLGenerator(row, column) != null) {
url = getItemURLGenerator(row, column).generateURL(
dataset, row, column);
}
CategoryItemEntity entity = new CategoryItemEntity(bar, tip,
url, dataset, row, dataset.getColumnKey(column),
column);
entities.add(entity);
}
}

Thanks,
Pavani Oruganti.

Locked