ASP.NET Page /Reports/stackedchart.aspx (C#)
Uses Code Behind Page Page /Reports/StackedChart.aspx.cs (C#)
1: <%@ Page language="c#" Inherits="System.Web.UI.DataVisualization.Charting.Samples.StackedChart" Codebehind="StackedChart.aspx.cs" %>  
2:   
3: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >  
4: <html>  
5:     <head>  
6:         <title>WebForm1</title>  
7:     </head>  
8:     <body>  
9:         <form id="Form1" method="post" runat="server">  
10:             <p class="dscr">This sample demonstrates Stacked Area, Stacked Bar, Stacked Column, 100% Stacked Area,  
11:                 100% Stacked Bar, and 100% Stacked Column chart types.</p>  
12:             <table class="sampleTable">  
13:                 <tr>  
14:                     <td width="412" class="tdchart">  
15:                         <asp:CHART id="Chart1" runat="server" Height="296px" Width="412px" BackColor="#D3DFF0" BorderDashStyle="Solid" BackGradientStyle="TopBottom" BorderWidth="2" BorderColor="26, 59, 105">  
16:                             <legends>  
17:                                 <asp:Legend TitleFont="Microsoft Sans Serif, 8pt, style=Bold" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold" IsTextAutoFit="False" Enabled="False" Name="Default"></asp:Legend>  
18:                             </legends>                              
19:                             <borderskin SkinStyle="Emboss"></borderskin>  
20:                             <series>  
21:                                 <asp:Series Name="Series1" ChartType="StackedArea100" BorderColor="180, 26, 59, 105" Color="220, 65, 140, 240" ToolTip="Series1"></asp:Series>  
22:                                 <asp:Series Name="Series2" ChartType="StackedArea100" BorderColor="180, 26, 59, 105" Color="220, 252, 180, 65" ToolTip="Series2"></asp:Series>  
23:                                 <asp:Series Name="Series3" ChartType="StackedArea100" BorderColor="180, 26, 59, 105" Color="220, 224, 64, 10" ToolTip="Series3"></asp:Series>  
24:                                 <asp:Series Name="Series4" ChartType="StackedArea100" BorderColor="180, 26, 59, 105" Color="220, 5, 100, 146" ToolTip="Series4"></asp:Series>  
25:                             </series>  
26:                             <chartareas>  
27:                                 <asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="Transparent" BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom">  
28:                                     <area3dstyle Rotation="10" Inclination="15" WallWidth="0" />  
29:                                     <position Y="3" Height="92" Width="92" X="2"></position>  
30:                                     <axisy LineColor="64, 64, 64, 64"  LabelAutoFitMaxFontSize="8">  
31:                                         <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />  
32:                                         <MajorGrid LineColor="64, 64, 64, 64" />  
33:                                     </axisy>  
34:                                     <axisx LineColor="64, 64, 64, 64"  LabelAutoFitMaxFontSize="8">  
35:                                         <LabelStyle Font="Trebuchet MS, 8.25pt, style=Bold" />  
36:                                         <MajorGrid LineColor="64, 64, 64, 64" />  
37:                                     </axisx>  
38:                                 </asp:ChartArea>  
39:                             </chartareas>  
40:                         </asp:CHART>  
41:                     </td>  
42:                 </tr>  
43:             </table>  
44:             <p class="dscr"><!-- SECOND DESCRIPTION HERE--> When using the Stacked bar or  
45:                 Stacked column types, you can group different series into separate groups by  
46:                 setting the StackedGroupName custom attribute.</p>  
47:         </form>  
48:     </body>  
49: </html>  

.NET Documentation Tool is © 2002 - 2009 Winnersh Triangle Web Solutions Limited.