# Project delivery in March 2026 · Gantt

Preview

![Project delivery in March 2026](family-gantt-wide-light.png)

![Project delivery in March 2026](family-gantt-wide-dark.png)

800 × 264 pixels

## Create this example

Create a console project, add the ChartForgeX and ChartForgeX.Interactivity.Html packages, and replace Program.cs with this source. Run it to write SVG, PNG and HTML with the default system fonts.

For the same typography as the gallery, [download the gallery-font recipe](family-gantt-wide-dark.gallery.csharp.txt) and copy the gallery’s fonts directory beside your program.

```
#region Setup
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using ChartForgeX;
using ChartForgeX.Core;
using ChartForgeX.Primitives;
using ChartForgeX.Rendering;
using ChartForgeX.Themes;
using ChartForgeX.Topology;
using ChartForgeX.Typography;
using ChartForgeX.VisualArtifacts;
using ChartForgeX.VisualBlocks;

var mode = ThemeMode.Light;
var theme = VisualTheme.Graphite();
var model = GanttRecipe.Create("wide", mode);
var context = new VisualRenderContext(
    new VisualLayoutOptions(new VisualSize(800, 264)), theme, mode,
    new VisualFrame("Project delivery in March 2026", "", showLegend: null, showSurface: false));
var prepared = model.Prepare(context);
File.WriteAllText("visual.svg", prepared.ToSvg());
File.WriteAllBytes("visual.png", prepared.ToPng());
File.WriteAllText("visual.html", prepared.ToArtifact("example", VisualArtifactKind.Chart).ToHtmlPage());
#endregion

/// <summary>Tasks, progress and a milestone connected through chart-owned dependency handles.</summary>
public static class GanttRecipe {
    public static Chart Create(string variant = "wide", ThemeMode mode = ThemeMode.Light) {
        var start = new DateTime(2026, 3, 2, 8, 0, 0, DateTimeKind.Utc);
        var discovery = ChartSeries.CreateGanttTask(new ChartSeriesId("discovery"), "Discovery", start, start.AddDays(3), .9);
        var implementation = ChartSeries.CreateGanttTask(new ChartSeriesId("implementation"), "Implementation", start.AddDays(3), start.AddDays(7), .55);
        var validation = ChartSeries.CreateGanttTask(new ChartSeriesId("validation"), "Validation", start.AddDays(7), start.AddDays(9), .1);
        var delivery = ChartSeries.CreateGanttMilestone(new ChartSeriesId("delivery"), "Delivery", start.AddDays(9));
        return Chart.Create().AddSeries(discovery).AddSeries(implementation).AddSeries(validation).AddSeries(delivery)
            .AddGanttDependency(discovery, implementation).AddGanttDependency(implementation, validation).AddGanttDependency(validation, delivery)
            .XAxis(axis => {
                axis.Scale = ChartScaleKind.Time;
                axis.ValueFormat = ChartValueFormat.Custom(value => DateTime.FromOADate(value).ToString("MMM d", CultureInfo.InvariantCulture));
            });
    }
}
```

```
#region Setup
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using ChartForgeX;
using ChartForgeX.Core;
using ChartForgeX.Primitives;
using ChartForgeX.Rendering;
using ChartForgeX.Themes;
using ChartForgeX.Topology;
using ChartForgeX.Typography;
using ChartForgeX.VisualArtifacts;
using ChartForgeX.VisualBlocks;

var mode = ThemeMode.Dark;
var theme = VisualTheme.Graphite();
var model = GanttRecipe.Create("wide", mode);
var context = new VisualRenderContext(
    new VisualLayoutOptions(new VisualSize(800, 264)), theme, mode,
    new VisualFrame("Project delivery in March 2026", "", showLegend: null, showSurface: false));
var prepared = model.Prepare(context);
File.WriteAllText("visual.svg", prepared.ToSvg());
File.WriteAllBytes("visual.png", prepared.ToPng());
File.WriteAllText("visual.html", prepared.ToArtifact("example", VisualArtifactKind.Chart).ToHtmlPage());
#endregion

/// <summary>Tasks, progress and a milestone connected through chart-owned dependency handles.</summary>
public static class GanttRecipe {
    public static Chart Create(string variant = "wide", ThemeMode mode = ThemeMode.Light) {
        var start = new DateTime(2026, 3, 2, 8, 0, 0, DateTimeKind.Utc);
        var discovery = ChartSeries.CreateGanttTask(new ChartSeriesId("discovery"), "Discovery", start, start.AddDays(3), .9);
        var implementation = ChartSeries.CreateGanttTask(new ChartSeriesId("implementation"), "Implementation", start.AddDays(3), start.AddDays(7), .55);
        var validation = ChartSeries.CreateGanttTask(new ChartSeriesId("validation"), "Validation", start.AddDays(7), start.AddDays(9), .1);
        var delivery = ChartSeries.CreateGanttMilestone(new ChartSeriesId("delivery"), "Delivery", start.AddDays(9));
        return Chart.Create().AddSeries(discovery).AddSeries(implementation).AddSeries(validation).AddSeries(delivery)
            .AddGanttDependency(discovery, implementation).AddGanttDependency(implementation, validation).AddGanttDependency(validation, delivery)
            .XAxis(axis => {
                axis.Scale = ChartScaleKind.Time;
                axis.ValueFormat = ChartValueFormat.Custom(value => DateTime.FromOADate(value).ToString("MMM d", CultureInfo.InvariantCulture));
            });
    }
}
```

<!-- PowerForge markdown artifact sha256:6949C286D955583270F86E3DA9869CD872121683246ED785B92BF2CE08659ACE -->
