# Processing time by workload · Scatter

Preview

![Processing time by workload](family-scatter-pivot-quadrants-light.png)

![Processing time by workload](family-scatter-pivot-quadrants-dark.png)

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](family-scatter-pivot-quadrants-light.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 = QuadrantRegionDepthRecipe.Create("pivot-quadrants", mode);
var context = new VisualRenderContext(
    new VisualLayoutOptions(new VisualSize(800, 440)), theme, mode,
    new VisualFrame("Processing time by workload", "", 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>Effort/impact observations with native quadrant borders, deliberate captions and rules through an authored pivot.</summary>
public static class QuadrantRegionDepthRecipe {
    /// <summary>Creates a complete public-API chart; exports use the same native prepared scene.</summary>
    public static Chart Create(string variant = "pivot-quadrants", ThemeMode mode = ThemeMode.Light) {
        if (variant is not ("pivot-quadrants" or "compact-pivot-quadrants" or "interior-quadrants" or "compact-interior-quadrants")) throw new ArgumentOutOfRangeException(nameof(variant));
        var chart = Chart.Create().Size(variant.StartsWith("compact-", StringComparison.Ordinal) ? 360 : 800, 440)
            .Theme(VisualTheme.Graphite()).ThemeMode(mode).Title("Effort and impact").Subtitle("Authored 4-day / 6-point pivot")
            .Legend(false).DataLabels(false).ShowGrid(false)
            .XAxis(x => x.Title("Effort (days)")).YAxis(y => y.Title("Impact (score)")).XAxis(x => x.Bounds(0, 10)).YAxis(y => y.Bounds(0, 10))
            .AddScatter("Proposed work", new[] { new ChartPoint(1.4, 8.1), new ChartPoint(3.1, 7.3), new ChartPoint(7.2, 8.8),
                new ChartPoint(8.4, 6.8), new ChartPoint(2.5, 2.1), new ChartPoint(6.5, 3.2) });
        if (variant.EndsWith("interior-quadrants", StringComparison.Ordinal))
            chart.XAxis(axis => axis.CrossAt(6)).YAxis(axis => axis.CrossAt(4));
        else chart.XAxis(axis => axis.RuleCrossAt(6)).YAxis(axis => axis.RuleCrossAt(4));
        var border = new ChartStrokeStyle(width: 1.5, opacity: .65, dash: new[] { 5d, 3d });
        chart.AddPlotRegion(new ChartPlotRegion(0, xMaximum: 4, yMinimum: 6, label: "Prioritize")
                .WithBorder(border).WithLabelPosition(ChartPlotRegionLabelPosition.TopLeft))
            .AddPlotRegion(new ChartPlotRegion(1, xMinimum: 4, yMinimum: 6, label: "Plan")
                .WithBorder(border).WithLabelPosition(ChartPlotRegionLabelPosition.TopRight))
            .AddPlotRegion(new ChartPlotRegion(2, xMaximum: 4, yMaximum: 6, label: "Consider")
                .WithBorder(border).WithLabelPosition(ChartPlotRegionLabelPosition.BottomLeft))
            .AddPlotRegion(new ChartPlotRegion(3, xMinimum: 4, yMaximum: 6, label: "Reassess")
                .WithBorder(border).WithLabelPosition(ChartPlotRegionLabelPosition.BottomRight));
        return chart;
    }
}
```

```
#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 = QuadrantRegionDepthRecipe.Create("pivot-quadrants", mode);
var context = new VisualRenderContext(
    new VisualLayoutOptions(new VisualSize(800, 440)), theme, mode,
    new VisualFrame("Processing time by workload", "", 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>Effort/impact observations with native quadrant borders, deliberate captions and rules through an authored pivot.</summary>
public static class QuadrantRegionDepthRecipe {
    /// <summary>Creates a complete public-API chart; exports use the same native prepared scene.</summary>
    public static Chart Create(string variant = "pivot-quadrants", ThemeMode mode = ThemeMode.Light) {
        if (variant is not ("pivot-quadrants" or "compact-pivot-quadrants" or "interior-quadrants" or "compact-interior-quadrants")) throw new ArgumentOutOfRangeException(nameof(variant));
        var chart = Chart.Create().Size(variant.StartsWith("compact-", StringComparison.Ordinal) ? 360 : 800, 440)
            .Theme(VisualTheme.Graphite()).ThemeMode(mode).Title("Effort and impact").Subtitle("Authored 4-day / 6-point pivot")
            .Legend(false).DataLabels(false).ShowGrid(false)
            .XAxis(x => x.Title("Effort (days)")).YAxis(y => y.Title("Impact (score)")).XAxis(x => x.Bounds(0, 10)).YAxis(y => y.Bounds(0, 10))
            .AddScatter("Proposed work", new[] { new ChartPoint(1.4, 8.1), new ChartPoint(3.1, 7.3), new ChartPoint(7.2, 8.8),
                new ChartPoint(8.4, 6.8), new ChartPoint(2.5, 2.1), new ChartPoint(6.5, 3.2) });
        if (variant.EndsWith("interior-quadrants", StringComparison.Ordinal))
            chart.XAxis(axis => axis.CrossAt(6)).YAxis(axis => axis.CrossAt(4));
        else chart.XAxis(axis => axis.RuleCrossAt(6)).YAxis(axis => axis.RuleCrossAt(4));
        var border = new ChartStrokeStyle(width: 1.5, opacity: .65, dash: new[] { 5d, 3d });
        chart.AddPlotRegion(new ChartPlotRegion(0, xMaximum: 4, yMinimum: 6, label: "Prioritize")
                .WithBorder(border).WithLabelPosition(ChartPlotRegionLabelPosition.TopLeft))
            .AddPlotRegion(new ChartPlotRegion(1, xMinimum: 4, yMinimum: 6, label: "Plan")
                .WithBorder(border).WithLabelPosition(ChartPlotRegionLabelPosition.TopRight))
            .AddPlotRegion(new ChartPlotRegion(2, xMaximum: 4, yMaximum: 6, label: "Consider")
                .WithBorder(border).WithLabelPosition(ChartPlotRegionLabelPosition.BottomLeft))
            .AddPlotRegion(new ChartPlotRegion(3, xMinimum: 4, yMaximum: 6, label: "Reassess")
                .WithBorder(border).WithLabelPosition(ChartPlotRegionLabelPosition.BottomRight));
        return chart;
    }
}
```

<!-- PowerForge markdown artifact sha256:F7472716403201EFA3721AC0BA7A47B8D2496F09F57734D0D5CE69167D7A9AE7 -->
