ARTICLE

WPF 3D Pie Chart

Posted by Sapna Articles | WPF using VB.NET November 18, 2010
In this article, I will show you how to create a simple 3D pie chart in WPF.
Download Files:
 
Reader Level:

This article shows you how to create a simple 3D pie chart in WPF. 3D Pie Chart is a useful program which provides both a client and server side solution for the incorporation of Pie Charts into web pages. See the code snippets for the WPF 3D pie chart.

<Window x:Class="_3DPie.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="3D Pie Chart" Height="390" Width="450">
    <Grid>
        <DockPanel Width="Auto" VerticalAlignment="Stretch" Height="Auto" HorizontalAlignment="Stretch" Grid.ColumnSpan="1"
Grid.Column="0" Grid.Row="0"
                Margin="0,0,0,0" Grid.RowSpan="1">
            <Viewport3D Name="mainViewport" ClipToBounds="True">
                <Viewport3D.Camera>
                    <OrthographicCamera x:Name="camera" FarPlaneDistance="100" LookDirection="0,10,-10" UpDirection="0,1,0"
                    NearPlaneDistance="-20" Width="100" Position="0,-10,10"/>
                </Viewport3D.Camera>
                <ModelVisual3D>
                    <ModelVisual3D.Content>
                        <DirectionalLight Color="White" Direction="-1,-1,-10"/>
                    </ModelVisual3D.Content>
                </ModelVisual3D>
            </Viewport3D>
        </DockPanel>
    </Grid>
</
Window>

3D Pie Chart

pie-chart.gif

Hope you enjoy this article.

Login to add your contents and source code to this article
share this article :
post comment
 
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
    The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor