Bug (or missing feature....) in Gantt chart series
Posted: Wed Mar 30, 2005 11:56 am
Hi,
We use quite a few times Teechart to produce diagrams. Since today, we need to use a gantt chart. (Using version 6.01 with source).
I've encountered a bug (or a missing feature if you like):
To connect two 'Gantt points' one can use:
Series.AddGant( 0, 12, 0, 'something');
Series.AddGant( 14, 15, 1, 'after something');
Series.NextTask[0] := 1; // links the first point to the second point
However, adding another gant
Series.AddGant( 13, 20, 1)
will cause the 'GanttPoints' to be rearranged. The first entry is still at position 0, the second entry is now at position 2, and the third entry is at position 1.
Unfortunately, the NextTask references are NOT updated. !
This should be fixed in the next version (if not already).
A workaround would be to first order all points and then add them. However, everyone using them should also figure out what the behaviour would be for each possible addition. (Troublesome if you dont have the source) meaning what happens when I do this:
Series.AddGant( 0, 12, 0, 'something');
Series.AddGant( 14, 15, 0);
Series.AddGant( 14, 12, 1);
etc etc.
Grtz,
Marck
We use quite a few times Teechart to produce diagrams. Since today, we need to use a gantt chart. (Using version 6.01 with source).
I've encountered a bug (or a missing feature if you like):
To connect two 'Gantt points' one can use:
Series.AddGant( 0, 12, 0, 'something');
Series.AddGant( 14, 15, 1, 'after something');
Series.NextTask[0] := 1; // links the first point to the second point
However, adding another gant
Series.AddGant( 13, 20, 1)
will cause the 'GanttPoints' to be rearranged. The first entry is still at position 0, the second entry is now at position 2, and the third entry is at position 1.
Unfortunately, the NextTask references are NOT updated. !
This should be fixed in the next version (if not already).
A workaround would be to first order all points and then add them. However, everyone using them should also figure out what the behaviour would be for each possible addition. (Troublesome if you dont have the source) meaning what happens when I do this:
Series.AddGant( 0, 12, 0, 'something');
Series.AddGant( 14, 15, 0);
Series.AddGant( 14, 12, 1);
etc etc.
Grtz,
Marck