Xceed Toolkit Plus for WPF v5.1 Documentation
Xceed.Wpf.Toolkit Assembly / Xceed.Wpf.Toolkit.Chart Namespace / PiePrimitiveInfo Class
Members Example


In This Topic
    PiePrimitiveInfo Class
    In This Topic

    Represents information used to perform the layout of pie charts and the databinding of their primitives.

    Syntax
    'Declaration
     
    <TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
    <NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
    Public Class PiePrimitiveInfo 
       Inherits PrimitiveInfoBase
    'Usage
     
    Dim instance As PiePrimitiveInfo
    [TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
    [NameScopeProperty("NameScope", System.Windows.NameScope)]
    public class PiePrimitiveInfo : PrimitiveInfoBase 
    Example
    The following shows how to use databinding to configure pie slices using the class's Geometry and Interior properties, among others.
    <Window x:Class="WpfApplication56.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
            Title="MainWindow" Height="350" Width="525">
        <Window.Resources>
    
            <DataTemplate x:Key="PieTemplate">
                <Canvas Width="{Binding Path=W}" Height="{Binding Path=H}">
                    <Path x:Name="PieSlice" Stroke="Gray" StrokeThickness="2" Data="{Binding Path=Geometry}" Fill="{Binding Path=Interior}">
                        <Path.ToolTip>
                            <ToolTip>
                                <StackPanel Orientation="Vertical">
                                    <TextBlock Text="Name:"/>
                                    <TextBlock Text="{Binding Path=DataPoint.Label}"/>
                                    <TextBlock Text="Skills:"/>
                                    <TextBlock Text="{Binding Path=DataPoint.Y}"/>
                                </StackPanel>
                            </ToolTip>
                        </Path.ToolTip>
                        <Path.Triggers>
                            <EventTrigger RoutedEvent="Mouse.MouseEnter">
                                <EventTrigger.Actions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.3" Duration="0:0:0.4"/>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </EventTrigger.Actions>
                            </EventTrigger>
    
                            <EventTrigger RoutedEvent="Mouse.MouseLeave">
                                <EventTrigger.Actions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.4" />
                                        </Storyboard>
                                    </BeginStoryboard>
                                </EventTrigger.Actions>
                            </EventTrigger>
                        </Path.Triggers>
                    </Path>
                </Canvas>
            </DataTemplate>
    
    
        </Window.Resources>
        <Grid>
            <xctk:Chart>
                <xctk:Chart.Areas>
                    <xctk:Area x:Name="_area1" Title="Area #1" >
                        <xctk:Area.XAxis>
                            <xctk:Axis ShowTickLabels="True" />
                        </xctk:Area.XAxis>
                        <xctk:Area.YAxis>
                            <xctk:Axis ShowTickLabels="True" />
                        </xctk:Area.YAxis>
                        <xctk:Area.Series>
                            <xctk:Series x:Name="_series1"
                                         Template="{StaticResource PieTemplate}"
                                              
                                              Spacing="20"
                                              ShowPointsInLegend="false"
                                              ShowHintLabels="false"
                                              HintLineLength="20">
                                <xctk:Series.Layout>
                                    <xctk:PieLayout />
                                </xctk:Series.Layout>
                                <xctk:Series.DataPoints>
                                    <xctk:DataPoint X="1" Y="1" Label="Oct" />
                                    <xctk:DataPoint X="2" Y="2" Label="Jan"/>
                                    <xctk:DataPoint X="2.5" Y="1.5" Label="Feb" />
                                    <xctk:DataPoint X="4" Y="1" Label="Jun"/>
                                    <xctk:DataPoint X="1.5" Y="3" Label="Dec"/>
                                    <xctk:DataPoint X="5" Y="5" Label="Apr"/>
                                    <xctk:DataPoint X="3" Y="1" Label="Nov"/>
                                    <xctk:DataPoint X="4.5" Y="7" Label="Jul"/>
                                    <xctk:DataPoint X="3.5" Y="4.5" Label="Aug"/>
                                </xctk:Series.DataPoints>
                            </xctk:Series>
                        </xctk:Area.Series>
                    </xctk:Area>
                </xctk:Chart.Areas>
            </xctk:Chart>
        </Grid>
    </Window>
    Inheritance Hierarchy

    System.Object
       System.Windows.Threading.DispatcherObject
          System.Windows.DependencyObject
             Xceed.Wpf.Toolkit.Chart.PrimitiveInfoBase
                Xceed.Wpf.Toolkit.Chart.PiePrimitiveInfo

    Public Constructors
     NameDescription
    Public ConstructorInitializes a new instance of the PiePrimitiveInfo class.  
    Top
    Public Properties
     NameDescription
    Public PropertyGets or sets the x-coordinate for the center point of pie charts.  
    Public PropertyGets or sets the y-coordinate for the center point of pie charts.  
    Public PropertyGets or sets the object that participates in databinding for the corresponding ChartPrimitive. (Inherited from Xceed.Wpf.Toolkit.Chart.PrimitiveInfoBase)
    Public PropertyGets or sets the datapoint of the chart primitive. (Inherited from Xceed.Wpf.Toolkit.Chart.PrimitiveInfoBase)
    Public Property (Inherited from System.Windows.DependencyObject)
    Public Property (Inherited from System.Windows.Threading.DispatcherObject)
    Public PropertyGets or sets the end angle for pie chart segment primitives.  
    Public PropertyGets or sets the Geometry for pie charts and other more complex 2d charts that require Geometry and complex Shapes.  
    Public PropertyGets or sets the height of the chart primitive. (Inherited from Xceed.Wpf.Toolkit.Chart.PrimitiveInfoBase)
    Public PropertyGets or sets the interior brush of the chart primitive. (Inherited from Xceed.Wpf.Toolkit.Chart.PrimitiveInfoBase)
    Public PropertyGets or sets whether the primitive is "covered." (Inherited from Xceed.Wpf.Toolkit.Chart.PrimitiveInfoBase)
    Public PropertyGets or sets whether this chart primitive is highlighted. (Inherited from Xceed.Wpf.Toolkit.Chart.PrimitiveInfoBase)
    Public Property (Inherited from System.Windows.DependencyObject)
    Public PropertyGets or sets the pie segment radius.  
    Public PropertyGets or sets the start angle for pie chart segment primitives.  
    Public Property (Inherited from Xceed.Wpf.Toolkit.Chart.PrimitiveInfoBase)
    Public PropertyGets or sets the width of the chart primitive. (Inherited from Xceed.Wpf.Toolkit.Chart.PrimitiveInfoBase)
    Public PropertyGets or sets the range the primitive occupies on the x-axis. (Inherited from Xceed.Wpf.Toolkit.Chart.PrimitiveInfoBase)
    Public PropertyGets or sets the range the primitive occupies on the y-axis. (Inherited from Xceed.Wpf.Toolkit.Chart.PrimitiveInfoBase)
    Top
    Public Methods
    Protected Methods
     NameDescription
    Protected MethodOverloaded. Raises the PropertyChanged event. (Inherited from Xceed.Wpf.Toolkit.Chart.PrimitiveInfoBase)
    Protected Internal Method (Inherited from System.Windows.DependencyObject)
    Top
    Public Events
     NameDescription
    Public EventRaised when any property changes. (Inherited from Xceed.Wpf.Toolkit.Chart.PrimitiveInfoBase)
    Top
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also