Click here to Skip to main content
15,881,281 members
Articles / Desktop Programming / WPF

Simple and Easy-to-Use Pie Chart Controls in WPF

Rate me:
Please Sign up or sign in to vote.
4.96/5 (13 votes)
15 Mar 2013CPOL7 min read 76.6K   7.7K   38  
This article tries to make it very easy for you to create Pie charts in WPF.
<UserControl x:Class="PieControls.PieChart"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             xmlns:local="clr-namespace:PieControls"
             >
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
            <ColumnDefinition Width="Auto"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <local:PieControl VerticalAlignment="Center" HorizontalAlignment="Left" x:Name="Pie" 
                          Width="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Height}">            
        </local:PieControl>
    </Grid>
</UserControl>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead https://mathiversity.com
Unknown
I am a full-stack developer. My skills include JavaScript, C#/.Net, MS Azure cloud etc. I love to work on complex programming tasks requiring deep analysis, planning and use of efficient algorithms and data structures.

Comments and Discussions