← Gallery

State timeline

Target availability by site

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

Preview
Target availability by siteChart with 9 data series: dc1.ad.evotec.xyz, dc2.ad.evotec.xyz, dns.ad.evotec.xyz, dc3.ad.evotec.xyz, dc4.ad.evotec.xyz, adfs.ad.evotec.xyz, dc5.ad.evotec.xyz, 1.1.1.1, 8.8.8.8.dc1.ad.evotec.xyz · Up · 2026-10-27 00:00 UTC – 2026-10-27 03:00 UTC (3h)dc1.ad.evotec.xyz · Degraded · 2026-10-27 03:00 UTC – 2026-10-27 03:25 UTC (25m) · Response time above 250 msdc1.ad.evotec.xyz · Up · 2026-10-27 03:25 UTC – 2026-10-27 14:00 UTC (10h 35m)dc1.ad.evotec.xyz · Down · 2026-10-27 14:00 UTC – 2026-10-27 14:40 UTC (40m) · No response to LDAP binddc1.ad.evotec.xyz · Up · 2026-10-27 14:40 UTC – 2026-10-28 00:00 UTC (9h 20m)dc2.ad.evotec.xyz · Up · 2026-10-27 00:00 UTC – 2026-10-28 00:00 UTC (24h)dns.ad.evotec.xyz · Up · 2026-10-27 00:00 UTC – 2026-10-27 09:00 UTC (9h)dns.ad.evotec.xyz · Degraded · 2026-10-27 09:00 UTC – 2026-10-27 10:30 UTC (1h 30m) · Response time above 250 msdns.ad.evotec.xyz · Up · 2026-10-27 10:30 UTC – 2026-10-28 00:00 UTC (13h 30m)dc3.ad.evotec.xyz · Up · 2026-10-27 00:00 UTC – 2026-10-27 09:00 UTC (9h)dc3.ad.evotec.xyz · Down · 2026-10-27 09:00 UTC – 2026-10-27 09:15 UTC (15m) · No response to LDAP binddc3.ad.evotec.xyz · Up · 2026-10-27 09:15 UTC – 2026-10-28 00:00 UTC (14h 45m)dc4.ad.evotec.xyz · Up · 2026-10-27 00:00 UTC – 2026-10-27 03:00 UTC (3h)dc4.ad.evotec.xyz · Degraded · 2026-10-27 03:00 UTC – 2026-10-27 03:25 UTC (25m) · Response time above 250 msdc4.ad.evotec.xyz · Up · 2026-10-27 03:25 UTC – 2026-10-27 14:00 UTC (10h 35m)dc4.ad.evotec.xyz · Down · 2026-10-27 14:00 UTC – 2026-10-27 14:40 UTC (40m) · No response to LDAP binddc4.ad.evotec.xyz · Up · 2026-10-27 14:40 UTC – 2026-10-28 00:00 UTC (9h 20m)adfs.ad.evotec.xyz · Up · 2026-10-27 00:00 UTC – 2026-10-28 00:00 UTC (24h)dc5.ad.evotec.xyz · Up · 2026-10-27 00:00 UTC – 2026-10-27 09:00 UTC (9h)dc5.ad.evotec.xyz · Degraded · 2026-10-27 09:00 UTC – 2026-10-27 10:30 UTC (1h 30m) · Response time above 250 msdc5.ad.evotec.xyz · Up · 2026-10-27 10:30 UTC – 2026-10-28 00:00 UTC (13h 30m)1.1.1.1 · Up · 2026-10-27 00:00 UTC – 2026-10-27 13:00 UTC (13h)1.1.1.1 · Down · 2026-10-27 13:00 UTC – 2026-10-27 13:15 UTC (15m) · No DNS response1.1.1.1 · Up · 2026-10-27 13:15 UTC – 2026-10-28 00:00 UTC (10h 45m)8.8.8.8 · Up · 2026-10-27 00:00 UTC – 2026-10-27 03:00 UTC (3h)8.8.8.8 · Degraded · 2026-10-27 03:00 UTC – 2026-10-27 03:25 UTC (25m) · Response time above 250 ms8.8.8.8 · Up · 2026-10-27 03:25 UTC – 2026-10-27 14:00 UTC (10h 35m)8.8.8.8 · Down · 2026-10-27 14:00 UTC – 2026-10-27 14:40 UTC (40m) · No DNS response8.8.8.8 · Up · 2026-10-27 14:40 UTC – 2026-10-28 00:00 UTC (9h 20m)
Target availability by site
Target availability by siteChart with 9 data series: dc1.ad.evotec.xyz, dc2.ad.evotec.xyz, dns.ad.evotec.xyz, dc3.ad.evotec.xyz, dc4.ad.evotec.xyz, adfs.ad.evotec.xyz, dc5.ad.evotec.xyz, 1.1.1.1, 8.8.8.8.dc1.ad.evotec.xyz · Up · 2026-10-27 00:00 UTC – 2026-10-27 03:00 UTC (3h)dc1.ad.evotec.xyz · Degraded · 2026-10-27 03:00 UTC – 2026-10-27 03:25 UTC (25m) · Response time above 250 msdc1.ad.evotec.xyz · Up · 2026-10-27 03:25 UTC – 2026-10-27 14:00 UTC (10h 35m)dc1.ad.evotec.xyz · Down · 2026-10-27 14:00 UTC – 2026-10-27 14:40 UTC (40m) · No response to LDAP binddc1.ad.evotec.xyz · Up · 2026-10-27 14:40 UTC – 2026-10-28 00:00 UTC (9h 20m)dc2.ad.evotec.xyz · Up · 2026-10-27 00:00 UTC – 2026-10-28 00:00 UTC (24h)dns.ad.evotec.xyz · Up · 2026-10-27 00:00 UTC – 2026-10-27 09:00 UTC (9h)dns.ad.evotec.xyz · Degraded · 2026-10-27 09:00 UTC – 2026-10-27 10:30 UTC (1h 30m) · Response time above 250 msdns.ad.evotec.xyz · Up · 2026-10-27 10:30 UTC – 2026-10-28 00:00 UTC (13h 30m)dc3.ad.evotec.xyz · Up · 2026-10-27 00:00 UTC – 2026-10-27 09:00 UTC (9h)dc3.ad.evotec.xyz · Down · 2026-10-27 09:00 UTC – 2026-10-27 09:15 UTC (15m) · No response to LDAP binddc3.ad.evotec.xyz · Up · 2026-10-27 09:15 UTC – 2026-10-28 00:00 UTC (14h 45m)dc4.ad.evotec.xyz · Up · 2026-10-27 00:00 UTC – 2026-10-27 03:00 UTC (3h)dc4.ad.evotec.xyz · Degraded · 2026-10-27 03:00 UTC – 2026-10-27 03:25 UTC (25m) · Response time above 250 msdc4.ad.evotec.xyz · Up · 2026-10-27 03:25 UTC – 2026-10-27 14:00 UTC (10h 35m)dc4.ad.evotec.xyz · Down · 2026-10-27 14:00 UTC – 2026-10-27 14:40 UTC (40m) · No response to LDAP binddc4.ad.evotec.xyz · Up · 2026-10-27 14:40 UTC – 2026-10-28 00:00 UTC (9h 20m)adfs.ad.evotec.xyz · Up · 2026-10-27 00:00 UTC – 2026-10-28 00:00 UTC (24h)dc5.ad.evotec.xyz · Up · 2026-10-27 00:00 UTC – 2026-10-27 09:00 UTC (9h)dc5.ad.evotec.xyz · Degraded · 2026-10-27 09:00 UTC – 2026-10-27 10:30 UTC (1h 30m) · Response time above 250 msdc5.ad.evotec.xyz · Up · 2026-10-27 10:30 UTC – 2026-10-28 00:00 UTC (13h 30m)1.1.1.1 · Up · 2026-10-27 00:00 UTC – 2026-10-27 13:00 UTC (13h)1.1.1.1 · Down · 2026-10-27 13:00 UTC – 2026-10-27 13:15 UTC (15m) · No DNS response1.1.1.1 · Up · 2026-10-27 13:15 UTC – 2026-10-28 00:00 UTC (10h 45m)8.8.8.8 · Up · 2026-10-27 00:00 UTC – 2026-10-27 03:00 UTC (3h)8.8.8.8 · Degraded · 2026-10-27 03:00 UTC – 2026-10-27 03:25 UTC (25m) · Response time above 250 ms8.8.8.8 · Up · 2026-10-27 03:25 UTC – 2026-10-27 14:00 UTC (10h 35m)8.8.8.8 · Down · 2026-10-27 14:00 UTC – 2026-10-27 14:40 UTC (40m) · No DNS response8.8.8.8 · Up · 2026-10-27 14:40 UTC – 2026-10-28 00:00 UTC (9h 20m)
Target availability by site
800 × 520 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 = AvailabilityLanesRecipe.Create("availability", mode);
var context = new VisualRenderContext(
    new VisualLayoutOptions(new VisualSize(800, 520)), theme, mode,
    new VisualFrame("Target availability by site", "27 October 2026 (UTC); the right column is the available share", 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>Shows 24 hours of availability for nine targets in three sites, with the available share per lane.</summary>
public static class AvailabilityLanesRecipe {
    /// <summary>Creates grouped availability lanes; the compact variant keeps the same data.</summary>
    public static Chart Create(string variant = "availability", ThemeMode mode = ThemeMode.Light) {
        if (variant is not ("availability" or "compact-availability")) throw new ArgumentOutOfRangeException(nameof(variant));
        var colors = VisualTheme.Graphite().Resolve(mode);
        var start = new DateTime(2026, 10, 27, 0, 0, 0, DateTimeKind.Utc);
        var chart = Chart.Create().XAxis(x => x.TimeScale(timeZone: TimeZoneInfo.Utc))
            .StateCategories(new ChartStateCategory("up", "Up", colors.Status.Pass.Fill),
                new ChartStateCategory("degraded", "Degraded", colors.Status.Medium.Fill, ChartStatePattern.Hatched),
                new ChartStateCategory("down", "Down", colors.Status.Critical.Fill, ChartStatePattern.CrossHatched));
        chart.Options.StateTimeline.SummaryHeader = "Available";
        var targets = new[] {
            ("Warsaw", "dc1.ad.evotec.xyz", "No response to LDAP bind"), ("Warsaw", "dc2.ad.evotec.xyz", "No response to LDAP bind"),
            ("Warsaw", "dns.ad.evotec.xyz", "No DNS response"), ("Krakow", "dc3.ad.evotec.xyz", "No response to LDAP bind"),
            ("Krakow", "dc4.ad.evotec.xyz", "No response to LDAP bind"), ("Krakow", "adfs.ad.evotec.xyz", "No HTTPS response"),
            ("Frankfurt", "dc5.ad.evotec.xyz", "No response to LDAP bind"), ("Frankfurt", "1.1.1.1", "No DNS response"), ("Frankfurt", "8.8.8.8", "No DNS response")
        };
        for (var index = 0; index < targets.Length; index++) {
            var (site, name, outage) = targets[index];
            var segments = new List<ChartStateTimelineSegment>();
            var cursor = start; var down = 0d;
            foreach (var (hour, minutes, state) in Problems(index)) {
                var from = start.AddHours(hour);
                segments.Add(new ChartStateTimelineSegment(cursor, from, "up"));
                segments.Add(new ChartStateTimelineSegment(from, from.AddMinutes(minutes), state,
                    state == "down" ? outage : "Response time above 250 ms"));
                if (state == "down") down += minutes;
                cursor = from.AddMinutes(minutes);
            }
            segments.Add(new ChartStateTimelineSegment(cursor, start.AddHours(24), "up"));
            var available = 1 - down / (24 * 60);
            chart.AddSeries(ChartSeries.CreateStateTimelineLane(new ChartSeriesId("target-" + index.ToString(CultureInfo.InvariantCulture)), name, segments, site, available.ToString("0.0%", CultureInfo.InvariantCulture)));
        }
        return chart;
    }

    // Each target has at most two short problems at a fixed time of day, so the gallery stays reproducible.
    private static (int Hour, int Minutes, string State)[] Problems(int target) => (target % 4) switch {
        0 => new[] { (3, 25, "degraded"), (14, 40, "down") },
        1 => Array.Empty<(int, int, string)>(),
        2 => new[] { (9, 90, "degraded") },
        _ => new[] { (6 + target, 15, "down") }
    };
}
#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 = AvailabilityLanesRecipe.Create("availability", mode);
var context = new VisualRenderContext(
    new VisualLayoutOptions(new VisualSize(800, 520)), theme, mode,
    new VisualFrame("Target availability by site", "27 October 2026 (UTC); the right column is the available share", 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>Shows 24 hours of availability for nine targets in three sites, with the available share per lane.</summary>
public static class AvailabilityLanesRecipe {
    /// <summary>Creates grouped availability lanes; the compact variant keeps the same data.</summary>
    public static Chart Create(string variant = "availability", ThemeMode mode = ThemeMode.Light) {
        if (variant is not ("availability" or "compact-availability")) throw new ArgumentOutOfRangeException(nameof(variant));
        var colors = VisualTheme.Graphite().Resolve(mode);
        var start = new DateTime(2026, 10, 27, 0, 0, 0, DateTimeKind.Utc);
        var chart = Chart.Create().XAxis(x => x.TimeScale(timeZone: TimeZoneInfo.Utc))
            .StateCategories(new ChartStateCategory("up", "Up", colors.Status.Pass.Fill),
                new ChartStateCategory("degraded", "Degraded", colors.Status.Medium.Fill, ChartStatePattern.Hatched),
                new ChartStateCategory("down", "Down", colors.Status.Critical.Fill, ChartStatePattern.CrossHatched));
        chart.Options.StateTimeline.SummaryHeader = "Available";
        var targets = new[] {
            ("Warsaw", "dc1.ad.evotec.xyz", "No response to LDAP bind"), ("Warsaw", "dc2.ad.evotec.xyz", "No response to LDAP bind"),
            ("Warsaw", "dns.ad.evotec.xyz", "No DNS response"), ("Krakow", "dc3.ad.evotec.xyz", "No response to LDAP bind"),
            ("Krakow", "dc4.ad.evotec.xyz", "No response to LDAP bind"), ("Krakow", "adfs.ad.evotec.xyz", "No HTTPS response"),
            ("Frankfurt", "dc5.ad.evotec.xyz", "No response to LDAP bind"), ("Frankfurt", "1.1.1.1", "No DNS response"), ("Frankfurt", "8.8.8.8", "No DNS response")
        };
        for (var index = 0; index < targets.Length; index++) {
            var (site, name, outage) = targets[index];
            var segments = new List<ChartStateTimelineSegment>();
            var cursor = start; var down = 0d;
            foreach (var (hour, minutes, state) in Problems(index)) {
                var from = start.AddHours(hour);
                segments.Add(new ChartStateTimelineSegment(cursor, from, "up"));
                segments.Add(new ChartStateTimelineSegment(from, from.AddMinutes(minutes), state,
                    state == "down" ? outage : "Response time above 250 ms"));
                if (state == "down") down += minutes;
                cursor = from.AddMinutes(minutes);
            }
            segments.Add(new ChartStateTimelineSegment(cursor, start.AddHours(24), "up"));
            var available = 1 - down / (24 * 60);
            chart.AddSeries(ChartSeries.CreateStateTimelineLane(new ChartSeriesId("target-" + index.ToString(CultureInfo.InvariantCulture)), name, segments, site, available.ToString("0.0%", CultureInfo.InvariantCulture)));
        }
        return chart;
    }

    // Each target has at most two short problems at a fixed time of day, so the gallery stays reproducible.
    private static (int Hour, int Minutes, string State)[] Problems(int target) => (target % 4) switch {
        0 => new[] { (3, 25, "degraded"), (14, 40, "down") },
        1 => Array.Empty<(int, int, string)>(),
        2 => new[] { (9, 90, "degraded") },
        _ => new[] { (6 + target, 15, "down") }
    };
}