WPF 3D Pie Chart in VB.NET

In this article, I will show you how to create a simple 3D pie chart in WPF.
  • 3430
 

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.

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.