Hi,
We are using Infra version 6.3.
We have a requirement to show a task linked to one or more tasks. Now LinkTo column (int datatype) has option to enter only one GanntID at a time.Is there any roundabout to provide more than one GanttID to a LinkTo column.Please let me know a way to achive this in Gantt chart.
Thanks,Anandhev
the only way to achieve this is by handling the FillSceneGraph event, and adding extra Polylines to e.SceneGraph to make the additional links.
Thanks for the information.
It would be helpful for me to start if you could you provide a sample on the idea that you have suggested.
Thanks in advance.
Regards,
Anandhev
Thanks for clear response. I will implement this logic and get back you if required.
here's a code example of what i was talking about.
private void ultraChart1_FillSceneGraph(object sender, FillSceneGraphEventArgs e) { Box hocus = null, pocus = null; foreach (Primitive p in e.SceneGraph) { Box b = p as Box; if (b != null && b.Layer is GanttLayer) { int timeEntryIndex = Convert.ToInt32(b.Tags["TIME_ENTRY_INDEX"]); GanttItem item = b.DataPoint as GanttItem; switch (item.Times[timeEntryIndex].Owner) { case "hocus": hocus = b; break; case "pocus": pocus = b; break; } } } if (hocus != null && pocus != null) { int hDistance = pocus.rect.Left - hocus.rect.Right; Polyline pL = new Polyline(new DataPoint[] { new DataPoint(new Point(hocus.rect.Right, hocus.rect.Top + hocus.rect.Height / 2)), new DataPoint(new Point(hocus.rect.Right + hDistance / 2, hocus.rect.Top + hocus.rect.Height / 2)), new DataPoint(new Point(hocus.rect.Right + hDistance / 2, pocus.rect.Top + pocus.rect.Height / 2)), new DataPoint(new Point(pocus.rect.Left, pocus.rect.Top + pocus.rect.Height / 2)), }); pL.PE.Fill = Color.Red; e.SceneGraph.Add(pL); } }
It's a bit tricky,
but you could also add more GanttTimeEntries for the same time interval, an link them to different GanttTimeEntries.
Then hide visibility of the overlapped GanttTimeEntries handling ChartDrawItem event and modifying PE of the primitive (for example setting fillopacity=0 and borders=0)
sorry for my bad english
EDIT
I've just noticed that is the asp.net forum section.
My suggestion works for ultraWinChart but I don't know in the WebChart. I hope it's useful as well.