I'm using ultrachart, gantt Chart.
ultraganttview has milestone
but I can not find in ultra gantt chart.
how can I set the milestone.. deadline using ultragantchart
Hello kyveri,
At that moment we have not such kind functionlity (to represent milestone) in our GanttChart, but you could achieve this behavior if you are using FillSceneGraph event and implement the code below:
private void ultraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e) { List<Primitive> listPr = new List<Primitive>(); foreach (Primitive pr in e.SceneGraph) { if (pr.GetType() == typeof(Box) && pr.Column != -1 && pr.Row != -1) { int k = ((Box)pr).rect.Width; DateTime[] dt = ((Box)pr).Value as DateTime[]; if (dt != null && dt[0] == dt[1]) { Box mm = new Box(new Rectangle(((Box)pr).rect.X - (((Box)pr).rect.Height / 2), ((Box)pr).rect.Y, ((Box)pr).rect.Height, ((Box)pr).rect.Height)); mm.PE.Fill = Color.Red; mm.RotationAngle = 45; listPr.Add(mm); } } } foreach (Primitive item in listPr) e.SceneGraph.Add(item); }
private void ultraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e)
{
List<Primitive> listPr = new List<Primitive>();
foreach (Primitive pr in e.SceneGraph)
if (pr.GetType() == typeof(Box) && pr.Column != -1 && pr.Row != -1)
int k = ((Box)pr).rect.Width;
DateTime[] dt = ((Box)pr).Value as DateTime[];
if (dt != null && dt[0] == dt[1])
Box mm = new Box(new Rectangle(((Box)pr).rect.X - (((Box)pr).rect.Height / 2), ((Box)pr).rect.Y, ((Box)pr).rect.Height, ((Box)pr).rect.Height));
mm.PE.Fill = Color.Red;
mm.RotationAngle = 45;
listPr.Add(mm);
}
foreach (Primitive item in listPr) e.SceneGraph.Add(item);
Please take a look at the attached sample and video file for more detaila and let me know if you have any questions
thank you...
I need more hint
I want to draw many event on Gantt chart.
many event has same Gantt Item. not different item. same...
see the attach file.. ^^;
HI,
At that moment we have not such kind functionality in our Gantt chart. If you want to draw additional milestones or bars, you could do this via FillSceneGraph event, but these additioanl milestones/bars, but they could not be connected with the data from your DataSource.
Let me know if you have any further questions.
Regards