PieChart Class
A control that displays a pie chart based on given data.
public class PieChart : Control, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IPieChartPlotInfo
- Inheritance:
- System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control Object
- Derived:
- DonutChart
Constructors
PieChart()
Initializes a new instance of the PieChart class.
public PieChart()
Properties
DrawingSurfaceSize
Gets or sets the size of the drawing surface.
protected Size DrawingSurfaceSize { get; }
Property Value
- System.Windows.Size:
Size.
IsLegendVisible
Gets or sets a value indicating whether this instance is legend visible.
public bool IsLegendVisible { get; set; }
Property Value
- System.Boolean:
true
if this instance is legend visible; otherwise,false
.
LegendHorizontalPosition
Gets or sets the legend horizontal position.
public LegendHorizontalPosition LegendHorizontalPosition { get; set; }
Property Value
- LegendHorizontalPosition:
The legend horizontal position.
LegendMargin
Gets or sets the legend margin.
public Thickness LegendMargin { get; set; }
Property Value
- System.Windows.Thickness:
The legend margin.
LegendStyle
Gets or sets the legend style. Must have a TargetType of Legend.
public Style LegendStyle { get; set; }
Property Value
- System.Windows.Style:
The legend style.
LegendVerticalPosition
Gets or sets the legend vertical position.
public LegendVerticalPosition LegendVerticalPosition { get; set; }
Property Value
- LegendVerticalPosition:
The legend vertical position.
Series
Gets the series.
public ObservableCollection<PieSeries> Series { get; }
Property Value
- System.Collections.ObjectModel.ObservableCollection<PieSeries>:
The series.
TetherBrush
Gets or sets the brush used to draw label tethers.
public Brush TetherBrush { get; set; }
Property Value
- System.Windows.Media.Brush:
The tether brush.
Methods
MeasureOverride(Size)
Provides the behavior for the Measure pass of layout. Classes can override this method to define their own Measure pass behavior.
protected override Size MeasureOverride(Size availableSize)
Parameter | Type | Description |
---|---|---|
availableSize | System.Windows.Size | The available size that this object can give to child objects. Infinity (PositiveInfinity) can be specified as a value to indicate that the object will size to whatever content is available. |
Returns
- System.Windows.Size:
The size that this object determines it needs during layout, based on its calculations of the allocated sizes for child objects; or based on other considerations, such as a fixed container size.
OnApplyTemplate()
Invoked whenever application code or internal processes call ApplyTemplate
.
public override void OnApplyTemplate()
Refresh()
Refreshes this instance.
public void Refresh()
Fields
IsLegendVisibleProperty
Identifies the IsLegendVisible dependency property. This field is read-only.
public static readonly DependencyProperty IsLegendVisibleProperty
LegendHorizontalPositionProperty
Identifies the LegendHorizontalPosition dependency property. This field is read-only.
public static readonly DependencyProperty LegendHorizontalPositionProperty
LegendMarginProperty
Identifies the LegendMargin dependency property. This field is read-only.
public static readonly DependencyProperty LegendMarginProperty
LegendStyleProperty
Identifies the LegendStyle dependency property. This field is read-only.
public static readonly DependencyProperty LegendStyleProperty
LegendVerticalPositionProperty
Identifies the LegendVerticalPosition dependency property. This field is read-only.
public static readonly DependencyProperty LegendVerticalPositionProperty
TetherBrushProperty
Identifies the TetherBrush dependency property. This field is read-only.
public static readonly DependencyProperty TetherBrushProperty
Inherited Members
- System.Object.ToString()
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()
Extension Methods
- FrameworkElementExtensions.AnimateDoubleProperty(String, Double, Double, Double, Nullable<Double>, Nullable<Double>)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, String, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.BindToProperty(DependencyProperty, Object, DependencyProperty, BindingMode, IValueConverter, Object)
- FrameworkElementExtensions.GetCurrentSize()