← Gallery

Gantt

Project delivery in March 2026

Explore the example, download the output or use the C# source in your own project.

Preview
Project delivery in March 2026Chart with 4 data series: Discovery, Implementation, Validation, Delivery.Project delivery in March 2026Explore the data, then download the chartDiscoveryImplementationValidationDeliveryMar 2Mar 4Mar 6Mar 8Mar 10DiscoveryImplementationValidationDeliveryDiscovery: Mar 2 – Mar 5, 90%Implementation: Mar 5 – Mar 9, 55%Validation: Mar 9 – Mar 11, 10%Delivery: Mar 11 – Mar 11, 100%Discovery → ImplementationImplementation → ValidationValidation → Delivery
Project delivery in March 2026
Project delivery in March 2026Chart with 4 data series: Discovery, Implementation, Validation, Delivery.Project delivery in March 2026Explore the data, then download the chartDiscoveryImplementationValidationDeliveryMar 2Mar 4Mar 6Mar 8Mar 10DiscoveryImplementationValidationDeliveryDiscovery: Mar 2 – Mar 5, 90%Implementation: Mar 5 – Mar 9, 55%Validation: Mar 9 – Mar 11, 10%Delivery: Mar 11 – Mar 11, 100%Discovery → ImplementationImplementation → ValidationValidation → Delivery
Project delivery in March 2026
800 × 440 pixels

Create this example

Create a console project, add the ChartForgeX package, 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 and copy the gallery’s fonts directory beside your program.

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
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 = VisualThemeMode.Light;
var theme = VisualTheme.Graphite();
var model = GanttRecipe.Create("wide", mode);
var context = new VisualRenderContext(
    new VisualLayoutOptions(new VisualSize(800, 440)), theme, mode,
    new VisualFrame("Project delivery in March 2026", "Explore the data, then download the chart", 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());

/// <summary>Tasks, progress and a milestone connected through chart-owned dependency handles.</summary>
public static class GanttRecipe {
    public static Chart Create(string variant = "wide", VisualThemeMode mode = VisualThemeMode.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)
            .ConfigureXAxis(axis => {
                axis.Scale = ChartScaleKind.Time;
                axis.ValueFormat = ChartValueFormat.Custom(value => DateTime.FromOADate(value).ToString("MMM d", CultureInfo.InvariantCulture));
            }).WithValueFormat(ChartValueFormat.Number("0.##", CultureInfo.InvariantCulture));
    }
}
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
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 = VisualThemeMode.Dark;
var theme = VisualTheme.Graphite();
var model = GanttRecipe.Create("wide", mode);
var context = new VisualRenderContext(
    new VisualLayoutOptions(new VisualSize(800, 440)), theme, mode,
    new VisualFrame("Project delivery in March 2026", "Explore the data, then download the chart", 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());

/// <summary>Tasks, progress and a milestone connected through chart-owned dependency handles.</summary>
public static class GanttRecipe {
    public static Chart Create(string variant = "wide", VisualThemeMode mode = VisualThemeMode.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)
            .ConfigureXAxis(axis => {
                axis.Scale = ChartScaleKind.Time;
                axis.ValueFormat = ChartValueFormat.Custom(value => DateTime.FromOADate(value).ToString("MMM d", CultureInfo.InvariantCulture));
            }).WithValueFormat(ChartValueFormat.Number("0.##", CultureInfo.InvariantCulture));
    }
}