I am new to JFreeChart.
I need to create a plot which shows a call-stack functional decomposition which includes start time and end time in seconds (I guess in software development this is what some profiling tools do). It should show a hierachical call stack and may include repetition or parallel execution.
Consider the example:
F1 started at: 44 duration: 3245
F11 started at: 353 duration: 1258
F111 started at: 657 duration: 538
F12 started at: 1812 duration: 512
F12 started at: 2525 duration: 513
F13 started at: 3445 duration: 514
F13 started at: 3445 duration: 517
From the above data, F1 calls F11 which calls F111. The line of F1 will be wider (as calling function ) than all the others. F12 is called twice,sequentially, while F13 is called twice in parallel, the corresponding lines will be overlapping.
In theory this is almost like a GANTT chart, only that I see to be having problems with the creation of the SimpleTimePeriod:
Code: Select all
t = new Task(ee.getActivity().getName(), new SimpleTimePeriod(date(1,Calendar.APRIL,2001), date(1,Calendar.MAY,2002) ) ); t = new Task(ee.getActivity().getName(), new SimpleTimePeriod(ee.getStartTime(), ee.getEndTime() ));
The first (dummy) assignment above works (producing of course unrealistic bars with the same length, the second one doesn't (no chart displayed), probably the SimpleTimePeriod is not made to cope with seconds within one day.
Am I doing something wrong? And more in general, which is the best chart for my purposes, among those provided by JFreeChart ?
(I had considered going for the BarCharts but the bars in there all seem to start at the same level, which is zero, and that is different from what I need).
thanks in advance,