QuadrantChart Class

A quadrant chart: points placed on two axes that go from 0 to 1, over a square split into four quadrants, as for a priority or a risk matrix (Mermaid quadrantChart). The quadrants are numbered as in mathematics: 1 is the top right one, 2 the top left one, 3 the bottom left one and 4 the bottom right one.

public sealed class QuadrantChart : MermaidChart

Remarks

MermaidChart.ToPlot draws the chart on x and y scales that go from 0 to 1, with hidden axes and a fixed margin for the title and the texts of the axes. The bold and italic parts of a markdown text are written back but drawn as plain text.

Inheritance
MermaidChart QuadrantChart

Constructors

NameDescription
QuadrantChart()

QuadrantChart()

QuadrantChart.cs
public QuadrantChart()

No documentation is available.

Properties

NameDescription
ClassDefinitionsGets the styles that the points share by their QuadrantChartPoint.ClassName (Mermaid classDef).
ColorsGets the colors that replace the ones of the theme (the quadrant* theme variables of Mermaid).
ExternalBorderWidthGets or sets the width of the border around the quadrants. The default is 2.
HeightGets or sets the height of the chart, the axis labels included, in pixels. The title is drawn above it. The default is 500.
InternalBorderWidthGets or sets the width of the lines between the quadrants. The default is 1.
PointLabelFontSizeGets or sets the size of the texts of the points. The default is 12.
PointRadiusGets or sets the radius of the points that have none in their style. The default is 5.
PointTextPaddingGets or sets the space between a point and its text, in pixels. The default is 5.
PointsGets the points. The first ones are drawn above the next ones, as in Mermaid.
Quadrant1LabelGets or sets the text of the top right quadrant (Mermaid quadrant-1), or null for none.
Quadrant2LabelGets or sets the text of the top left quadrant (Mermaid quadrant-2), or null for none.
Quadrant3LabelGets or sets the text of the bottom left quadrant (Mermaid quadrant-3), or null for none.
Quadrant4LabelGets or sets the text of the bottom right quadrant (Mermaid quadrant-4), or null for none.
QuadrantLabelFontSizeGets or sets the size of the texts of the quadrants. The default is 16.
QuadrantPaddingGets or sets the space around the quadrants, in pixels. The default is 5.
QuadrantTextTopPaddingGets or sets the space between the top of a quadrant and its text when the chart has points, in pixels. The default is 5.
WidthGets or sets the width of the chart, the axis labels included, in pixels. The default is 500.
XAxisLabelFontSizeGets or sets the size of the texts of the x axis. The default is 16.
XAxisLabelPaddingGets or sets the space above and below the texts of the x axis, in pixels. The default is 5.
XAxisLeftLabelGets or sets the text on the left of the x axis, or null for none.
XAxisPositionGets or sets where the texts of the x axis are drawn. The default is QuadrantChartXAxisPosition.Top. As in Mermaid, they are always drawn at the bottom when the chart has points.
XAxisRightLabelGets or sets the text on the right of the x axis, or null for none. Mermaid needs QuadrantChart.XAxisLeftLabel with it.
YAxisBottomLabelGets or sets the text at the bottom of the y axis, or null for none.
YAxisLabelFontSizeGets or sets the size of the texts of the y axis. The default is 16.
YAxisLabelPaddingGets or sets the space on both sides of the texts of the y axis, in pixels. The default is 5.
YAxisPositionGets or sets where the texts of the y axis are drawn. The default is QuadrantChartYAxisPosition.Left.
YAxisTopLabelGets or sets the text at the top of the y axis, or null for none. Mermaid needs QuadrantChart.YAxisBottomLabel with it.

ClassDefinitions

QuadrantChart.cs

Gets the styles that the points share by their QuadrantChartPoint.ClassName (Mermaid classDef).

public IDictionary<string, QuadrantChartPointStyle> ClassDefinitions { get; }

Gets the colors that replace the ones of the theme (the quadrant* theme variables of Mermaid).

public QuadrantChartColors Colors { get; }

Property value

QuadrantChartColors

ExternalBorderWidth

QuadrantChart.cs

Gets or sets the width of the border around the quadrants. The default is 2.

public double ExternalBorderWidth { get; set; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0 and 1000.

Gets or sets the height of the chart, the axis labels included, in pixels. The title is drawn above it. The default is 500.

public double Height { get; set; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0 and 10000.

InternalBorderWidth

QuadrantChart.cs

Gets or sets the width of the lines between the quadrants. The default is 1.

public double InternalBorderWidth { get; set; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0 and 1000.

PointLabelFontSize

QuadrantChart.cs

Gets or sets the size of the texts of the points. The default is 12.

public double PointLabelFontSize { get; set; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0 and 1000.

PointRadius

QuadrantChart.cs

Gets or sets the radius of the points that have none in their style. The default is 5.

public double PointRadius { get; set; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0 and 10000.

PointTextPadding

QuadrantChart.cs

Gets or sets the space between a point and its text, in pixels. The default is 5.

public double PointTextPadding { get; set; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0 and 10000.

Gets the points. The first ones are drawn above the next ones, as in Mermaid.

public IList<QuadrantChartPoint> Points { get; }

Quadrant1Label

QuadrantChart.cs

Gets or sets the text of the top right quadrant (Mermaid quadrant-1), or null for none.

public DiagramText? Quadrant1Label { get; set; }

Property value

DiagramText?

Quadrant2Label

QuadrantChart.cs

Gets or sets the text of the top left quadrant (Mermaid quadrant-2), or null for none.

public DiagramText? Quadrant2Label { get; set; }

Property value

DiagramText?

Quadrant3Label

QuadrantChart.cs

Gets or sets the text of the bottom left quadrant (Mermaid quadrant-3), or null for none.

public DiagramText? Quadrant3Label { get; set; }

Property value

DiagramText?

Quadrant4Label

QuadrantChart.cs

Gets or sets the text of the bottom right quadrant (Mermaid quadrant-4), or null for none.

public DiagramText? Quadrant4Label { get; set; }

Property value

DiagramText?

QuadrantLabelFontSize

QuadrantChart.cs

Gets or sets the size of the texts of the quadrants. The default is 16.

public double QuadrantLabelFontSize { get; set; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0 and 1000.

QuadrantPadding

QuadrantChart.cs

Gets or sets the space around the quadrants, in pixels. The default is 5.

public double QuadrantPadding { get; set; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0 and 10000.

QuadrantTextTopPadding

QuadrantChart.cs

Gets or sets the space between the top of a quadrant and its text when the chart has points, in pixels. The default is 5.

public double QuadrantTextTopPadding { get; set; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0 and 10000.

Gets or sets the width of the chart, the axis labels included, in pixels. The default is 500.

public double Width { get; set; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0 and 10000.

XAxisLabelFontSize

QuadrantChart.cs

Gets or sets the size of the texts of the x axis. The default is 16.

public double XAxisLabelFontSize { get; set; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0 and 1000.

XAxisLabelPadding

QuadrantChart.cs

Gets or sets the space above and below the texts of the x axis, in pixels. The default is 5.

public double XAxisLabelPadding { get; set; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0 and 10000.

XAxisLeftLabel

QuadrantChart.cs

Gets or sets the text on the left of the x axis, or null for none.

public DiagramText? XAxisLeftLabel { get; set; }

Property value

DiagramText?

XAxisPosition

QuadrantChart.cs

Gets or sets where the texts of the x axis are drawn. The default is QuadrantChartXAxisPosition.Top. As in Mermaid, they are always drawn at the bottom when the chart has points.

public QuadrantChartXAxisPosition XAxisPosition { get; set; }

XAxisRightLabel

QuadrantChart.cs

Gets or sets the text on the right of the x axis, or null for none. Mermaid needs QuadrantChart.XAxisLeftLabel with it.

public DiagramText? XAxisRightLabel { get; set; }

Property value

DiagramText?

YAxisBottomLabel

QuadrantChart.cs

Gets or sets the text at the bottom of the y axis, or null for none.

public DiagramText? YAxisBottomLabel { get; set; }

Property value

DiagramText?

YAxisLabelFontSize

QuadrantChart.cs

Gets or sets the size of the texts of the y axis. The default is 16.

public double YAxisLabelFontSize { get; set; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0 and 1000.

YAxisLabelPadding

QuadrantChart.cs

Gets or sets the space on both sides of the texts of the y axis, in pixels. The default is 5.

public double YAxisLabelPadding { get; set; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not between 0 and 10000.

YAxisPosition

QuadrantChart.cs

Gets or sets where the texts of the y axis are drawn. The default is QuadrantChartYAxisPosition.Left.

public QuadrantChartYAxisPosition YAxisPosition { get; set; }

YAxisTopLabel

QuadrantChart.cs

Gets or sets the text at the top of the y axis, or null for none. Mermaid needs QuadrantChart.YAxisBottomLabel with it.

public DiagramText? YAxisTopLabel { get; set; }

Property value

DiagramText?

Methods

NameDescription
AddPoint(DiagramText, double, double)Adds a point.

AddPoint(DiagramText, double, double)

QuadrantChart.cs

Adds a point.

public QuadrantChartPoint AddPoint(DiagramText label, double x, double y)

Parameters

label DiagramText
The text drawn below the point.
x double
The position on the x axis, from 0 (left) to 1 (right).
y double
The position on the y axis, from 0 (bottom) to 1 (top).

Returns

QuadrantChartPoint The point.