← Gallery

Timeline

Project activities in March 2026

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

Preview
Project activities in March 2026Chart with 7 data series: Discovery, Service design, Implementation, Data migration, Validation, User training, Rollout.Discovery: Mar 2 – Mar 5, 3dService design: Mar 4 – Mar 9, 5dImplementation: Mar 6 – Mar 17, 11dData migration: Mar 11 – Mar 18, 7dValidation: Mar 16 – Mar 21, 5dUser training: Mar 18 – Mar 23, 5dRollout: Mar 21 – Mar 25, 4d
Project activities in March 2026
Project activities in March 2026Chart with 7 data series: Discovery, Service design, Implementation, Data migration, Validation, User training, Rollout.Discovery: Mar 2 – Mar 5, 3dService design: Mar 4 – Mar 9, 5dImplementation: Mar 6 – Mar 17, 11dData migration: Mar 11 – Mar 18, 7dValidation: Mar 16 – Mar 21, 5dUser training: Mar 18 – Mar 23, 5dRollout: Mar 21 – Mar 25, 4d
Project activities in March 2026
800 × 379 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 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 = TimelineRecipe.Create("wide", mode);
var context = new VisualRenderContext(
    new VisualLayoutOptions(new VisualSize(800, 379)), theme, mode,
    new VisualFrame("Project activities in March 2026", "Seven overlapping activities from kick-off to rollout", 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>Overlapping project activities in March 2026 with stable task identities and an explicitly configured time axis.</summary>
public static class TimelineRecipe {
    public static Chart Create(string variant = "wide", ThemeMode mode = ThemeMode.Light) {
        var start = new DateTime(2026, 3, 2, 8, 0, 0, DateTimeKind.Utc);
        var chart = Chart.Create();
        // Each activity starts and ends a whole number of days after the kick-off on Monday 2 March.
        foreach (var (id, name, from, to) in new[] {
            ("discovery", "Discovery", 0, 3), ("design", "Service design", 2, 7), ("implementation", "Implementation", 4, 15),
            ("migration", "Data migration", 9, 16), ("validation", "Validation", 14, 19), ("training", "User training", 16, 21),
            ("rollout", "Rollout", 19, 23) })
            chart.AddSeries(new ChartSeries(new ChartSeriesId(id), name, ChartSeriesKind.Timeline,
                new[] { new ChartPoint(start.AddDays(from).ToOADate(), start.AddDays(to).ToOADate()) }));
        return chart.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 = TimelineRecipe.Create("wide", mode);
var context = new VisualRenderContext(
    new VisualLayoutOptions(new VisualSize(800, 379)), theme, mode,
    new VisualFrame("Project activities in March 2026", "Seven overlapping activities from kick-off to rollout", 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>Overlapping project activities in March 2026 with stable task identities and an explicitly configured time axis.</summary>
public static class TimelineRecipe {
    public static Chart Create(string variant = "wide", ThemeMode mode = ThemeMode.Light) {
        var start = new DateTime(2026, 3, 2, 8, 0, 0, DateTimeKind.Utc);
        var chart = Chart.Create();
        // Each activity starts and ends a whole number of days after the kick-off on Monday 2 March.
        foreach (var (id, name, from, to) in new[] {
            ("discovery", "Discovery", 0, 3), ("design", "Service design", 2, 7), ("implementation", "Implementation", 4, 15),
            ("migration", "Data migration", 9, 16), ("validation", "Validation", 14, 19), ("training", "User training", 16, 21),
            ("rollout", "Rollout", 19, 23) })
            chart.AddSeries(new ChartSeries(new ChartSeriesId(id), name, ChartSeriesKind.Timeline,
                new[] { new ChartPoint(start.AddDays(from).ToOADate(), start.AddDays(to).ToOADate()) }));
        return chart.XAxis(axis => {
            axis.Scale = ChartScaleKind.Time;
            axis.ValueFormat = ChartValueFormat.Custom(value => DateTime.FromOADate(value).ToString("MMM d", CultureInfo.InvariantCulture));
        });
    }
}