Click here to Skip to main content
15,891,253 members
Articles / Web Development / ASP.NET

ASP.NET Charting Controls

Rate me:
Please Sign up or sign in to vote.
4.79/5 (17 votes)
25 Jan 2013Ms-PL2 min read 128.4K   4K   71  
Usage of ASP.NET Charting Controls provided with .NET Framework 3.5 SP1
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebApplication2._Default" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        
    </div>
  <asp:chart id="Chart1" runat="server" Height="296px" Width="512px" 
        BorderDashStyle="Solid" BackSecondaryColor="White" 
        BackGradientStyle="TopBottom" BorderWidth="2px" backcolor="211, 223, 240" 
        BorderColor="#1A3B69" DataMember="DefaultView"  >  
       <legends>  
           <asp:Legend IsTextAutoFit="false"  Name="Default" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold"></asp:Legend>  
       </legends>  
       <borderskin skinstyle="Sunken"></borderskin>  
       
       <chartareas>  
           <asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" 
                BackSecondaryColor="White" BackColor="64, 165, 191, 228" ShadowColor="Transparent" 
                BackGradientStyle="TopBottom">  
               <area3dstyle Rotation="10" perspective="10" Inclination="15" IsRightAngleAxes="False" 
                    wallwidth="0" IsClustered="False"></area3dstyle>  
               <axisy linecolor="64, 64, 64, 64">  
                   <labelstyle font="Trebuchet MS, 8.25pt, style=Bold" />  
                   <majorgrid linecolor="64, 64, 64, 64" />  
               </axisy>  
               <axisx linecolor="64, 64, 64, 64">  
                   <labelstyle font="Trebuchet MS, 8.25pt, style=Bold" />  
                   <majorgrid linecolor="64, 64, 64, 64" />  
               </axisx>  
               <Position Height="79.02613" Width="61.26034" X="5.55474472" Y="14.414547" />
           </asp:ChartArea>  
       </chartareas>  
   </asp:chart>  
  
    </form>
</body>
</html>

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 Microsoft Public License (Ms-PL)


Written By
Technical Lead Imaginnovate TechSolutions
India India
Spends free time, working with new stuff from Microsoft and Web technologies. Recently started working on "Ruby on Rails" and other open source technologies.

Comments and Discussions