Renders a bound dataset as a pie chart.
Namespace: MindFusion.Reporting.Wpf
Assembly: MindFusion.Reporting.Wpf
C# Copy Code |
---|
public class PieChart : ChartReportItem |
Visual Basic Copy Code |
---|
Public Class PieChart |
The pie chart displays the data specified by the DataSource property. If DataSource is null (Nothing in Visual Basic) the PieChart raises the QueryDetails event of its containing report passing its DataContext as a master row and uses the return IEnumeration as data source. If QueryDetails did not yield any details, the DataContext is used as a data source.
The TargetMember property specifies the property of the objects in the data source, which will be used for pie plotting.
Let Simple is a class defined as following:
C# Copy Code |
---|
public class Simple |
Visual Basic Copy Code |
---|
Public Class Simple |
Let us have the following static definition of an array of Simple objects, defined in XAML:
XAML Copy Code |
---|
<x:ArrayExtension Type="{x:Type l:Simple}" x:Key="data"> |
Then we can define a simple PieChart showing the above array as following:
XAML Copy Code |
---|
<r:PieChart DataContext="{StaticResource data}" TargetMember="IntField" Size="200,200" PieStroke="Black" PieStrokeThickness="1" /> |
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
MindFusion.Reporting.Wpf.ReportItem
MindFusion.Reporting.Wpf.Chart
MindFusion.Reporting.Wpf.PieChart