Text labels inside Gantt chart bars

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
PJCrew2
Posts: 3
Joined: Thu May 03, 2007 8:22 am

Text labels inside Gantt chart bars

Post by PJCrew2 » Thu May 03, 2007 8:35 am

Hello! I have a simple Gantt chart here, that consists of a number of Tasks just like that:
TaskSeries s1 = new TaskSeries("Planned Tasks");
Task newTask = new Task("Task" +
String.valueOf(taskIndex),
new
SimpleTimePeriod(currentTime,
currentTime +
(int) distributionTime)
);
s1.add(newTask)
final TaskSeriesCollection collection = new TaskSeriesCollection();
collection.add(s1);

JFreeChart chart = ChartFactory.createGanttChart(
"Distribution ",
"Task",
"Time",
collection,
true,
true,
false
);


Is there a way to write something INSIDE each bar, representing a task? For example, if the task is made up of a two subtasks, is it possible to mark them with labels, so their names would be seen on a plot? Thanks in advance!

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

Post by david.gilbert » Thu May 03, 2007 9:33 am

Looking at the renderer code, it seems there is support for item labels when drawing just plain tasks, but when drawing sub-tasks the item label code has not been included.
David Gilbert
JFreeChart Project Leader

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

PJCrew2
Posts: 3
Joined: Thu May 03, 2007 8:22 am

Post by PJCrew2 » Fri May 04, 2007 2:55 pm

That is a pity, thank you!

pradheep
Posts: 15
Joined: Thu Apr 12, 2007 4:47 am
Location: Chennai [INDIA]
Contact:

Post by pradheep » Mon May 07, 2007 12:46 pm

david.gilbert wrote:Looking at the renderer code, it seems there is support for item labels when drawing just plain tasks, but when drawing sub-tasks the item label code has not been included.
Gilbet

i am using horizontal stack bar chart for multiple records. i need the domain axis label to be drawn horizontally. but its vertical.


can anyone tell me the solution for this, since am new to JFreeChart

Pradheep
--------------------------------
Cheers
PraDz

Locked