| ||
Introducing SharpPlot Your First Chart Recent Updates Sample Charts Tutorials General Tutorials Chart Tutorials SharpPlot Class Properties Structures Enumerations Style examples Glossaries Active Charts VectorMath Class DBUtil Class Get SharpPlot Download SharpPlot Buying SharpPlot SharpPlot Support Upgrading from GraPL Release notes |
Reference > Methods > DrawGanttChart Method SharpPlot.DrawGanttChart MethodConstruct a horizontal Gantt chart from schedule data (activities and times). Examplesp.SetMargins(6,12,36,4); sp.SetColors(new Color[]{Color.OrangeRed,Color.ForestGreen}); sp.SetYLabels(new string[]{"Cut","Polish","Pack"}); sp.SetXTickMarks(5); sp.SetYTickMarks(new double[] {0.5,1.5,2.5,3.5}); process = new int[] {1,1,2,2,2,3,3}; start = new int[] {24,28,25,29,35,29,42}; end = new int[] {28,32,29,33,40,30,44}; done = new bool[]{true,false,true,false,false,true,false}; sp.YAxisStyle = YAxisStyles.ForceZero|YAxisStyles.MiddleLabels|YAxisStyles.GridLines; sp.KeyStyle = KeyStyles.NoKey; sp.SplitBy(done); sp.DrawGanttChart(process,start,end); The short tutorial shows a few of the possibilities and some sample code. Overloads
DescriptionGantt charts were originally devised as a graphical way to show the relationship between activites in a project plan, and have been made very popular by tools such as MS Project. The chart shows time progressing from left to right, with each activity drawn as a colored bar, and generally labelled with its name. The Y-axis shows some higher-level grouping of related tasks. This style of chart also works very well as a way to show a production schedule (machines are shown on the Y-axis) or to record the output from any kind of logging system. See also ...Use and Abuse of Gantt charts | SharpPlot Members | GanttChartStyle Property |