PieSlice Class

A slice of a pie chart: a label and a value, whose share of the total sets the angle of the slice.

public sealed class PieSlice

Constructors

NameDescription
PieSlice(string, double)Initializes a new instance of the PieSlice class.

PieSlice(string, double)

PieSlice.cs

Initializes a new instance of the PieSlice class.

public PieSlice(string label, double value)

Parameters

label string
The label of the slice, written in the legend.
value double
The value of the slice, positive or zero.

Properties

NameDescription
LabelGets or sets the label of the slice, written in the legend.
ValueGets or sets the value of the slice, positive or zero.

Gets or sets the label of the slice, written in the legend.

public string Label { get; set; }

Property value

string

Gets or sets the value of the slice, positive or zero.

public double Value { get; set; }

Property value

double