RadarChart Class

A radar chart, also known as a spider chart: axes around a center, and curves that join a value on each axis, to compare several series over several dimensions (Mermaid radar-beta).

public sealed class RadarChart : MermaidChart
Inheritance
MermaidChart RadarChart

Constructors

NameDescription
RadarChart()

RadarChart()

RadarChart.cs
public RadarChart()

No documentation is available.

Properties

NameDescription
AxesGets the axes, clockwise from the top.
AxisColorGets or sets the color of the axes (Mermaid axisColor). The default is the line color of the theme.
AxisLabelFactorGets or sets the distance of the labels of the axes from the center, as a ratio of the radius (Mermaid axisLabelFactor). The default is 1.05.
AxisLabelFontSizeGets or sets the font size of the labels of the axes (Mermaid axisLabelFontSize). The default is 12.
AxisScaleFactorGets or sets the length of the axis lines, as a ratio of the radius of the chart (Mermaid axisScaleFactor). The default is 1.
AxisStrokeWidthGets or sets the width of the axes (Mermaid axisStrokeWidth). The default is 2.
CurveOpacityGets or sets the opacity of the fill of the curves, from 0 to 1 (Mermaid curveOpacity). The default is 0.5.
CurveStrokeWidthGets or sets the width of the curves (Mermaid curveStrokeWidth). The default is 2.
CurveTensionGets or sets the tension of the rounded curves, from 0 for straight lines to 1 (Mermaid curveTension). The default is 0.17. The rounded curves are the Catmull-Rom splines of Meziantou.Framework.Charts, which have no tension: the value is written back, but only 0, straight lines, changes the drawing.
CurvesGets the curves. The colors of the theme go to the curves in their order.
GraticuleGets or sets the shape of the scale and of the curves (Mermaid graticule). The default is RadarGraticule.Circle.
GraticuleColorGets or sets the color of the scale (Mermaid graticuleColor). The default is #dedede.
GraticuleOpacityGets or sets the opacity of the fill of the scale, from 0 to 1 (Mermaid graticuleOpacity). The default is 0.3.
GraticuleStrokeWidthGets or sets the width of the lines of the scale (Mermaid graticuleStrokeWidth). The default is 1.
HeightGets or sets the height of the chart, without its margins (Mermaid height). The default is 600.
LegendFontSizeGets or sets the font size of the legend (Mermaid legendFontSize). The default is 12.
MarginBottomGets or sets the margin below the chart (Mermaid marginBottom). The default is 50.
MarginLeftGets or sets the margin on the left of the chart (Mermaid marginLeft). The default is 50.
MarginRightGets or sets the margin on the right of the chart (Mermaid marginRight). The default is 50.
MarginTopGets or sets the margin above the chart, where the title and the legend are drawn (Mermaid marginTop). The default is 50.
MaximumGets or sets the value at the end of the axes, or null for the largest value of the curves (Mermaid max). The values above it are drawn at the end of the axes.
MinimumGets or sets the value at the center (Mermaid min). The default is 0. The values below it are drawn at the center.
ShowLegendGets or sets a value that indicates whether the legend lists the curves, in the top right corner (Mermaid showLegend). The default is true.
TicksGets or sets the number of circles or polygons of the scale, from 0 to 32 (Mermaid ticks). The default is 5.
WidthGets or sets the width of the chart, without its margins (Mermaid width). The default is 600.

Gets the axes, clockwise from the top.

public IList<RadarAxis> Axes { get; }

Property value

IList<RadarAxis>

AxisColor

RadarChart.cs

Gets or sets the color of the axes (Mermaid axisColor). The default is the line color of the theme.

public SceneColor? AxisColor { get; set; }

Property value

SceneColor?

AxisLabelFactor

RadarChart.cs

Gets or sets the distance of the labels of the axes from the center, as a ratio of the radius (Mermaid axisLabelFactor). The default is 1.05.

public double AxisLabelFactor { get; set; }

Property value

double

AxisLabelFontSize

RadarChart.cs

Gets or sets the font size of the labels of the axes (Mermaid axisLabelFontSize). The default is 12.

public double? AxisLabelFontSize { get; set; }

Property value

double?

AxisScaleFactor

RadarChart.cs

Gets or sets the length of the axis lines, as a ratio of the radius of the chart (Mermaid axisScaleFactor). The default is 1.

public double AxisScaleFactor { get; set; }

Property value

double

AxisStrokeWidth

RadarChart.cs

Gets or sets the width of the axes (Mermaid axisStrokeWidth). The default is 2.

public double? AxisStrokeWidth { get; set; }

Property value

double?

CurveOpacity

RadarChart.cs

Gets or sets the opacity of the fill of the curves, from 0 to 1 (Mermaid curveOpacity). The default is 0.5.

public double? CurveOpacity { get; set; }

Property value

double?

CurveStrokeWidth

RadarChart.cs

Gets or sets the width of the curves (Mermaid curveStrokeWidth). The default is 2.

public double? CurveStrokeWidth { get; set; }

Property value

double?

CurveTension

RadarChart.cs

Gets or sets the tension of the rounded curves, from 0 for straight lines to 1 (Mermaid curveTension). The default is 0.17. The rounded curves are the Catmull-Rom splines of Meziantou.Framework.Charts, which have no tension: the value is written back, but only 0, straight lines, changes the drawing.

public double CurveTension { get; set; }

Property value

double

Gets the curves. The colors of the theme go to the curves in their order.

public IList<RadarCurve> Curves { get; }

Property value

IList<RadarCurve>

Graticule

RadarChart.cs

Gets or sets the shape of the scale and of the curves (Mermaid graticule). The default is RadarGraticule.Circle.

public RadarGraticule Graticule { get; set; }

Property value

RadarGraticule

GraticuleColor

RadarChart.cs

Gets or sets the color of the scale (Mermaid graticuleColor). The default is #dedede.

public SceneColor? GraticuleColor { get; set; }

Property value

SceneColor?

GraticuleOpacity

RadarChart.cs

Gets or sets the opacity of the fill of the scale, from 0 to 1 (Mermaid graticuleOpacity). The default is 0.3.

public double? GraticuleOpacity { get; set; }

Property value

double?

GraticuleStrokeWidth

RadarChart.cs

Gets or sets the width of the lines of the scale (Mermaid graticuleStrokeWidth). The default is 1.

public double? GraticuleStrokeWidth { get; set; }

Property value

double?

Gets or sets the height of the chart, without its margins (Mermaid height). The default is 600.

public double Height { get; set; }

Property value

double

LegendFontSize

RadarChart.cs

Gets or sets the font size of the legend (Mermaid legendFontSize). The default is 12.

public double? LegendFontSize { get; set; }

Property value

double?

MarginBottom

RadarChart.cs

Gets or sets the margin below the chart (Mermaid marginBottom). The default is 50.

public double MarginBottom { get; set; }

Property value

double

MarginLeft

RadarChart.cs

Gets or sets the margin on the left of the chart (Mermaid marginLeft). The default is 50.

public double MarginLeft { get; set; }

Property value

double

MarginRight

RadarChart.cs

Gets or sets the margin on the right of the chart (Mermaid marginRight). The default is 50.

public double MarginRight { get; set; }

Property value

double

MarginTop

RadarChart.cs

Gets or sets the margin above the chart, where the title and the legend are drawn (Mermaid marginTop). The default is 50.

public double MarginTop { get; set; }

Property value

double

Gets or sets the value at the end of the axes, or null for the largest value of the curves (Mermaid max). The values above it are drawn at the end of the axes.

public double? Maximum { get; set; }

Property value

double?

Gets or sets the value at the center (Mermaid min). The default is 0. The values below it are drawn at the center.

public double Minimum { get; set; }

Property value

double

ShowLegend

RadarChart.cs

Gets or sets a value that indicates whether the legend lists the curves, in the top right corner (Mermaid showLegend). The default is true.

public bool ShowLegend { get; set; }

Property value

bool

Gets or sets the number of circles or polygons of the scale, from 0 to 32 (Mermaid ticks). The default is 5.

public int Ticks { get; set; }

Property value

int

Gets or sets the width of the chart, without its margins (Mermaid width). The default is 600.

public double Width { get; set; }

Property value

double

Methods

NameDescription
AddAxis(string, string?)Adds an axis after the last one.
AddCurve(string, string?, IEnumerable<double>)Adds a curve after the last one.

AddAxis(string, string?)

RadarChart.cs

Adds an axis after the last one.

public RadarAxis AddAxis(string name, string? label = null)

Parameters

name string
The identifier of the axis.
label string?
The text drawn at the end of the axis, or null to draw the identifier.

Returns

RadarAxis The axis.

AddCurve(string, string?, IEnumerable<double>)

RadarChart.cs

Adds a curve after the last one.

public RadarCurve AddCurve(string name, string? label, params IEnumerable<double> values)

Parameters

name string
The identifier of the curve.
label string?
The text of the curve in the legend, or null to write the identifier.
values IEnumerable<double>
The values, in the order of the axes.

Returns

RadarCurve The curve.