PieChart Class
A control that displays a pie chart based on given data.
public class PieChart : Control
- Inheritance:
- object Visual UIElement FrameworkElement Control object
- Derived:
- DonutChart
Constructors
PieChart()
Initializes an instance of the class.
public PieChart()
Properties
DrawingSurfaceSize
The size of the drawing surface.
protected Size DrawingSurfaceSize { get; }
Property Value
- Size
IsLegendVisible
Indicates whether the legend is visible.
LegendHorizontalPosition
The legend horizontal position.
public LegendHorizontalPosition LegendHorizontalPosition { get; set; }
Property Value
LegendMargin
The legend margin.
LegendStyle
The legend style. Must have a TargetType of Legend.
LegendVerticalPosition
The legend vertical position.
public LegendVerticalPosition LegendVerticalPosition { get; set; }
Property Value
Series
The series.
public ObservableCollection<PieSeries> Series { get; }
Property Value
TetherBrush
The brush used for label tethers.
public Brush? TetherBrush { get; set; }
Property Value
Remarks
If TetherBrush is not set, then Foreground will be used instead.
Methods
MeasureOverride(Size)
Called to remeasure a control.
protected override Size MeasureOverride(Size availableSize)
| Parameter | Type | Description |
|---|---|---|
| availableSize | Size |
Returns
- Size:
The size of the control, up to the maximum specified by
constraint.
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
public override void OnApplyTemplate()
Refresh()
Refreshes this instance.
public void Refresh()
Fields
IsLegendVisibleProperty
Defines the IsLegendVisible property.
public static readonly DependencyProperty IsLegendVisibleProperty
LegendHorizontalPositionProperty
Defines the LegendHorizontalPosition property.
public static readonly DependencyProperty LegendHorizontalPositionProperty
LegendMarginProperty
Defines the LegendMargin property.
public static readonly DependencyProperty LegendMarginProperty
LegendStyleProperty
Defines the LegendStyle property.
public static readonly DependencyProperty LegendStyleProperty
LegendVerticalPositionProperty
Defines the LegendVerticalPosition property.
public static readonly DependencyProperty LegendVerticalPositionProperty
TetherBrushProperty
Defines the TetherBrush property.
public static readonly DependencyProperty TetherBrushProperty