Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
GantChart Item Labels
posted

I'm having real trouble getting labels displayed on a Gantt Chart (WinChart), I have two (or more) times on a Gantt Item each with a different label but I cannot seem to get these labels displayed on the chart (ideally in the middle of the item bar).

eg:

GanttItem gi = new GanttItem("Item  1");

 

int

 

iPos = gi.Times.Add(dr.GetDateTime(3), dr.GetDateTime(4));

gi.Times[iPos].ID = 0;

gi.Times[iPos].Label =

"Label "  + iPos;

iPos = gi.Times.Add(dr.GetDateTime(3), dr.GetDateTime(4));

gi.Times[iPos].ID = 1;

gi.Times[iPos].Label = "Label "  + iPos;

Should show two bars on the same line on the GanttChart with a label in each bar ("Label 0" in the first, "Label 1" in the second).

No label is displayed at all, I've tried to do this with BoxAnnotations but have just ended up with the same annotation on both bars.

Any help gratefully received.

Cheers

Dave