日期:2014-05-20 浏览次数:20962 次
<form id="Forms1" method="post" runat="server">
<p class="dscr">This sample demonstrates how to use the Chart control without
code-behind pages.</p>
<table class="sampleTable">
<tr>
<td class="tdchart">
<%
System.Web.UI.DataVisualization.Charting.Chart Chart1 = new System.Web.UI.DataVisualization.Charting.Chart();
Chart1.Width = 412;
Chart1.Height = 296;
Chart1.RenderType = RenderType.ImageTag;
Chart1.ImageLocation = "..\\TempImages\\ChartPic_#SEQ(200,30)";
Chart1.Palette = ChartColorPalette.BrightPastel;
Title t = new Title("No Code Behind Page", Docking.Top, new System.Drawing.Font("Trebuchet MS", 14, System.Drawing.FontStyle.Bold), System.Drawing.Color.FromArgb(26, 59, 105));
Chart1.Titles.Add(t);
Chart1.ChartAreas.Add("Series 1");
// create a couple of series
Chart1.Series.Add("Series 1");
Chart1.Series.Add("Series 2");