ScottPlot.NET
A radial gauge chart displays scalar data as circular gauges.
• This page contains recipes for the Radial Gauge category.
• Visit the Cookbook Home Page to view all cookbook recipes.
• Generated by ScottPlot 4.1.52 on 7/9/2022

A radial gauge chart displays scalar data as circular gauges.

``````var plt = new ScottPlot.Plot(600, 400);

double[] values = { 100, 80, 65, 45, 20 };

``````

## Gauge Colors

Gauge colors can be customized by changing the default palette.

``````var plt = new ScottPlot.Plot(600, 400);

double[] values = { 100, 80, 65, 45, 20 };
plt.Palette = ScottPlot.Drawing.Palette.Nord;

``````

## Negative Values

Radial gauge plots support positive and negative values.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, -65, 45, -20 };

``````

## Sequential Gauge Mode

Sequential gauge mode indicates that the base of each gauge starts at the tip of the previous gauge.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, 65, 45, 50 };

``````

## Reverse Order

Gauges are displayed from the center outward by default but the order can be customized.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, 65, 45, 50 };

gauges.OrderInsideOut = false;

``````

## Single Gauge Mode

The SingleGauge mode draws all gauges stacked together as a single gauge. This is useful for showing a progress gauges composed of many individual smaller gauges.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, 65, 45 };

gauges.MaximumAngle = 180;
gauges.StartingAngle = 180;

``````

## Gauge Direction

The direction of gauges can be customized. Clockwise is used by default.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, 65, 45, 20 };

gauges.Clockwise = false;

``````

## Gauge Size

The empty space between gauges can be adjusted as a fraction of their width.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, 65, 45, 20 };
gauges.SpaceFraction = .05;

``````

## Gauge Caps

Caps can be customized for the starting and end of the gauges.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, 65, 45, 20 };

gauges.CircularBackground = false;
gauges.StartCap = System.Drawing.Drawing2D.LineCap.Flat;
gauges.EndCap = System.Drawing.Drawing2D.LineCap.DiamondAnchor;

``````

## Gauge Starting Angle

The starting angle for gauges can be customized. 270 for North (default value), 0 for East, 90 for South, 180 for West, etc.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, 65, 45, 20 };

gauges.StartingAngle = 180;

``````

## Gauge Angular Range

By default gauges are full circles (360 degrees) but smaller gauges can be created by customizing the gauge size.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, 65, 45, 20 };

gauges.MaximumAngle = 180;

``````

## Show Levels

The value of each gauge is displayed as text by default but this behavior can be overridden. Note that this is different than the labels fiels which is what appears in the legened.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, 65, 45, 20 };

gauges.ShowLevels = false;

``````

## Gauge Label Position

Gauge level text is positioned at the tip of each gauge by default, but this position can be adjusted by the user.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, 65, 45, 20 };

gauges.LabelPositionFraction = 0;

``````

## Gauge Label Font Percentage

Size of the gauge level text as a fraction of the gauge width.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, 65, 45, 20 };

gauges.FontSizeFraction = .4;

``````

## Gauge Label Color

Level text fonts may be customized.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, 65, 45, 20 };

gauges.Font.Color = Color.Black;

``````

## Gauge Labels in Legend

Radial gauge labels will appear in the legend if they are assigned.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, 65, 45, 20 };

gauges.Labels = new string[] { "alpha", "beta", "gamma", "delta", "epsilon" };
plt.Legend(true);

``````

## Background Gauges Dim

By default the full range of each gauge is drawn as a semitransparent ring. The amount of transparency can be adjusted as desired.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, 65, 45, 20 };

gauges.BackgroundTransparencyFraction = .5;

``````

## Background Gauges Normalization

Gauge backgrounds are drawn as full circles by default. This behavior can be disabled to draw partial backgrounds for non-circular gauges.

``````var plt = new ScottPlot.Plot(600, 400);

plt.Palette = ScottPlot.Drawing.Palette.Nord;
double[] values = { 100, 80, 65, 45, 20 };

gauges.CircularBackground = false;
gauges.MaximumAngle = 180;
gauges.StartingAngle = 180;