April 15, 2010

Create a 3D chart in ASP.NET 4.0




Creating a 3D chart in ASP.NET 4.0 is a cakewalk! Let us take an example of converting a simple chart to a 3D chart in ASP.NET 4.0

The chart shown below is a simple Column chart

<asp:Chart ID="Chart1" runat="server"
DataSourceID="ObjectDataSource1">
<
Series>
<
asp:Series Name="Series1"
XValueMember="Year" YValueMembers="Revenue"
ChartType="Column">
</
asp:Series>
</
Series>
<
ChartAreas>
<
asp:ChartArea Name="ChartArea1">
</
asp:ChartArea>
</
ChartAreas>
</
asp:Chart>
<
asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="GetEstimates" TypeName="Estimate">
</
asp:ObjectDataSource>
 

image

To convert this chart into a 3D chart, you just need to add the Area3DStyle property inside the ChartArea object as show below:

    <ChartAreas>
<
asp:ChartArea Name="ChartArea1">
<
area3dstyle
Enable3D="True"
Inclination="10"
LightStyle="Realistic"
Perspective="15"
IsRightAngleAxes="False"
IsClustered="False" />
</
asp:ChartArea>

The result is a 3D chart.

image

With better designer skills, you can create some awesome 3D charts!



'Like' us on our FaceBook page if you find this blog useful. Thanks!


Did you like this post?
kick it on DotNetKicks.com Save on Delicious
subscribe via rss subscribe via e-mail
print this post follow me on twitter


About The Author

Suprotim Agarwal, ASP.NET Architecture MVP works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls.

Follow him on twitter @suprotimagarwal

comments

4 Responses to "Create a 3D chart in ASP.NET 4.0"
  1. Revol said...
    April 18, 2010 7:32 PM

    kewl had no idea aspnet charts have this feature

  2. Mike said...
    April 20, 2010 7:39 AM

    It´s old from .NET 3.5

    http://www.microsoft.com/downloads/details.aspx?FamilyID=130f7986-bf49-4fe5-9ca8-910ae6ea442c&DisplayLang=en

  3. Aji Issac said...
    June 12, 2010 1:47 AM

    Thanks for the detailed tutorial. Have you tried http://www.fusioncharts.com/aspnet/ (The product used by Google, FB and over 14000 top fellows) ... What I like the most is the simplicity it offers to the developers.

  4. Mike said...
    May 4, 2012 6:45 AM

    Thanks very much for the post, simples :o)

 

Copyright © 2009-2012 All Rights Reserved for DevCurry.com by Suprotim Agarwal | Terms and Conditions