# Regional counts and targets · Radial Column

Preview

![Regional counts and targets](family-radial-column-mixed-curves-light.png)

![Regional counts and targets](family-radial-column-mixed-curves-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-radial-column-mixed-curves-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 = MixedRadialRecipe.Create("mixed-curves", mode);
var context = new VisualRenderContext(
    new VisualLayoutOptions(new VisualSize(800, 440)), theme, mode,
    new VisualFrame("Regional counts and targets", "Columns, reference area and target line share categories and radius", showLegend: true, 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>Observed counts compared with a radar reference area and an unfilled target line.</summary>
public static class MixedRadialRecipe {
    /// <summary>Creates shared radial categories with optional closed curves or reversed angular order.</summary>
    public static Chart Create(string variant = "wide", ThemeMode mode = ThemeMode.Light, double? curveTension = null) {
        if (variant is not ("wide" or "compact" or "mixed" or "compact-mixed" or "mixed-curves" or "compact-mixed-curves" or "mixed-angular-reversal" or "compact-mixed-angular-reversal"))
            throw new ArgumentOutOfRangeException(nameof(variant));
        var tension = curveTension ?? (variant is "mixed-curves" or "compact-mixed-curves" ? 1d : (double?)null);
        var reference = new ChartSeries(new ChartSeriesId("reference"), "Reference", ChartSeriesKind.Radar, Points(1000, 900, 1100, 1000))
            .Radar(options => { options.FillOpacity = .15; options.CurveTension = tension; })
            .Markers(markers => markers.Enabled = false);
        var observed = new ChartSeries(new ChartSeriesId("observed"), "Observed", ChartSeriesKind.RadialColumn, Points(1200, 700, 1050, 950));
        var target = new ChartSeries(new ChartSeriesId("target"), "Target", ChartSeriesKind.Radar, Points(1400, 1200, 1300, 1250))
            .Radar(options => { options.Form = ChartLineAreaForm.Line; options.CurveTension = tension; })
            .Markers(markers => { markers.Shape = ChartMarkerShape.Diamond; markers.Radius = 4; });
        var chart = Chart.Create().XLabels("North", "East", "South", "West").YAxis(y => y.Bounds(0, 1600)).DataLabels(false)
            .RadialGeometry(new ChartRadialGeometryOptions(innerRadiusRatio: .22, cornerRadius: 4))
            .AddSeries(reference).AddSeries(observed).AddSeries(target);
        if (variant is "mixed-angular-reversal" or "compact-mixed-angular-reversal") chart.XAxis(axis => axis.Reversed());
        return chart;
    }

    private static ChartPoint[] Points(params double[] values) => values.Select((value, index) => new ChartPoint(index + 1, value)).ToArray();
}
```

```
#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 = MixedRadialRecipe.Create("mixed-curves", mode);
var context = new VisualRenderContext(
    new VisualLayoutOptions(new VisualSize(800, 440)), theme, mode,
    new VisualFrame("Regional counts and targets", "Columns, reference area and target line share categories and radius", showLegend: true, 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>Observed counts compared with a radar reference area and an unfilled target line.</summary>
public static class MixedRadialRecipe {
    /// <summary>Creates shared radial categories with optional closed curves or reversed angular order.</summary>
    public static Chart Create(string variant = "wide", ThemeMode mode = ThemeMode.Light, double? curveTension = null) {
        if (variant is not ("wide" or "compact" or "mixed" or "compact-mixed" or "mixed-curves" or "compact-mixed-curves" or "mixed-angular-reversal" or "compact-mixed-angular-reversal"))
            throw new ArgumentOutOfRangeException(nameof(variant));
        var tension = curveTension ?? (variant is "mixed-curves" or "compact-mixed-curves" ? 1d : (double?)null);
        var reference = new ChartSeries(new ChartSeriesId("reference"), "Reference", ChartSeriesKind.Radar, Points(1000, 900, 1100, 1000))
            .Radar(options => { options.FillOpacity = .15; options.CurveTension = tension; })
            .Markers(markers => markers.Enabled = false);
        var observed = new ChartSeries(new ChartSeriesId("observed"), "Observed", ChartSeriesKind.RadialColumn, Points(1200, 700, 1050, 950));
        var target = new ChartSeries(new ChartSeriesId("target"), "Target", ChartSeriesKind.Radar, Points(1400, 1200, 1300, 1250))
            .Radar(options => { options.Form = ChartLineAreaForm.Line; options.CurveTension = tension; })
            .Markers(markers => { markers.Shape = ChartMarkerShape.Diamond; markers.Radius = 4; });
        var chart = Chart.Create().XLabels("North", "East", "South", "West").YAxis(y => y.Bounds(0, 1600)).DataLabels(false)
            .RadialGeometry(new ChartRadialGeometryOptions(innerRadiusRatio: .22, cornerRadius: 4))
            .AddSeries(reference).AddSeries(observed).AddSeries(target);
        if (variant is "mixed-angular-reversal" or "compact-mixed-angular-reversal") chart.XAxis(axis => axis.Reversed());
        return chart;
    }

    private static ChartPoint[] Points(params double[] values) => values.Select((value, index) => new ChartPoint(index + 1, value)).ToArray();
}
```

<!-- PowerForge markdown artifact sha256:756A8DFE777FFEE46B7F89853D593DBB1665744E2490F151D2BE86821A417D6A -->
