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
100
How can I set the milestone on gantt chart
posted

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

Parents
  • 53790
    Suggested Answer
    posted

    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);

            }

    Please take a look at the attached sample and video file for more detaila and let me know if you have any questions

    UltraChartGanttChartExcludeRow.zip
Reply Children