VennArea Class
An area of a VennDiagram: a set, drawn as a circle (Mermaid set), or the overlap of several sets (Mermaid union), with its label and its size.
public sealed class VennAreaConstructors
| Name | Description |
|---|---|
| VennArea(IEnumerable<string>, string?, double?) | Initializes a new instance of the VennArea class. |
VennArea(IEnumerable<string>, string?, double?)
VennArea.csInitializes a new instance of the VennArea class.
public VennArea(IEnumerable<string> sets, string? label = null, double? size = null)Parameters
setsIEnumerable<string>- The identifiers of the sets: one for a set, several for an overlap. They are sorted in ordinal order, as Mermaid does.
labelstring?- The label, or
nullto show the identifier of a set and nothing on an overlap. sizedouble?- The size, or
nullfor the size of Mermaid: 10 divided by the square of the number of sets.
Exceptions
ArgumentExceptionsetsis empty or containsnull.ArgumentOutOfRangeExceptionsizeis negative or not finite.
Properties
| Name | Description |
|---|---|
| EffectiveSize | Gets the size the layout uses: VennArea.Size, or 10 divided by the square of the number of sets. |
| IsSet | Gets a value indicating whether the area is a set, drawn as a circle, rather than an overlap. |
| Label | Gets or sets the label, or null to show the identifier of a set and nothing on an overlap. |
| Sets | Gets the identifiers of the sets, sorted in ordinal order. |
| Size | Gets or sets the size: the area of the circle, or of the overlap, relative to the other sizes. A set of size 0 is not drawn, nor its overlaps. null is the size of Mermaid: 10 divided by the square of the number of sets, so 10 for a set and 2.5 for the overlap of two sets. |
EffectiveSize
VennArea.csGets the size the layout uses: VennArea.Size, or 10 divided by the square of the number of sets.
public double EffectiveSize { get; }Property value
IsSet
VennArea.csLabel
VennArea.csSets
VennArea.csGets the identifiers of the sets, sorted in ordinal order.
public ReadOnlyCollection<string> Sets { get; }Property value
Size
VennArea.csGets or sets the size: the area of the circle, or of the overlap, relative to the other sizes. A set of size 0 is not drawn, nor its overlaps. null is the size of Mermaid: 10 divided by the square of the number of sets, so 10 for a set and 2.5 for the overlap of two sets.
public double? Size { get; set; }Methods
| Name | Description |
|---|---|
| ToString() | Returns the sets of the area. |