1.3: Gantt chart

Another new sample in version 1.3 is a simple Gantt chart:

The orange-red nodes highlight the critical path.

This example Gantt chart is defined with the following data:

// create the diagram's data model var model = new GraphModel<Activity, int>(); int row = 1; model.NodesSource = new ObservableCollection<Activity>() { // don't use Key==0 new Activity() { Key=1, Row=row++, Text="Start", FromKeys=P(), Length=0, Start=0, Critical=true, Category="Start" }, new Activity() { Key=2, Row=row++, Text="a", FromKeys=P( 1 ), Length=4, Start=0, Critical=true }, new Activity() { Key=3, Row=row++, Text="b", FromKeys=P( 1 ), Length=5.33, Start=0 }, new Activity() { Key=4, Row=row++, Text="c", FromKeys=P( 2 ), Length=5.17, Start=4, Critical=true }, new Activity() { Key=5, Row=row++, Text="d", FromKeys=P( 2 ), Length=6.33, Start=4 }, new Activity() { Key=6, Row=row++, Text="e", FromKeys=P( 3, 4 ), Length=5.17, Start=9.17, Critical=true }, new Activity() { Key=7, Row=row++, Text="f", FromKeys=P( 5 ), Length=4.5, Start=10.33 }, new Activity() { Key=8, Row=row++, Text="g", FromKeys=P( 6 ), Length=5.17, Start=14.34, Critical=true }, new Activity() { Key=9, Row=row++, Text="Finish", FromKeys=P( 7, 8 ), Length=0, Start=19.51, Critical=true, Category="Finish" }, // add Dates along the top new Activity() { Key=9999, Row=0, Text="23Jul", Start=0, Category="Week" }, new Activity() { Key=9999, Row=0, Text="30Jul", Start=5, Category="Week" }, new Activity() { Key=9999, Row=0, Text="6Aug", Start=10, Category="Week" }, new Activity() { Key=9999, Row=0, Text="13Aug", Start=15, Category="Week" }, }; myDiagram.Model = model;