⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 floatingpie.aspx

📁 掌握学习.net开发的非常好的资料
💻 ASPX
字号:
<%@ Page Language="C#" Description="dotnetCHARTING Component"%>
<%@ Register TagPrefix="dotnet"  Namespace="dotnetCHARTING" Assembly="dotnetCHARTING"%>
<%@ Import Namespace="System.Drawing" %>


<script runat="server">
void Page_Load(Object sender,EventArgs e)
{
	//set global properties
    Chart.DefaultSeries.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;user id=admin;password=;data source=" + Server.MapPath("../../database/chartsample.mdb");  
    Chart.Title="Sales";
    Chart.Size="800x300";
    Chart.XAxis.Label.Text="Months";
    Chart.Type = ChartType.Pies;
    Chart.TempDirectory="temp";
    Chart.Debug=true;
    Chart.DefaultSeries.StartDate= new DateTime(2002,2,1,0,0,0);
    Chart.DefaultSeries.EndDate = new DateTime(2002,6,30,23,59,59);
    Chart.DateGrouping = TimeInterval.Months;
    Chart.Use3D=true;

    Chart.DefaultShadow.Color = Color.Transparent;

    
    
    //Chart.LegendType = "WithValues";
    Chart.Background = new Background("border.gif",BackgroundMode.ImageStretch);
    Chart.ChartArea.Background = new Background(Color.FromArgb(206,206,194));
    Chart.Margin = "30";
    Chart.Height = 498; //This is adjusted up from 480 for the sample to prevent the branded footer from covering the border.
    Chart.TitleBox.Position = TitleBoxPosition.FullWithLegend;
    Chart.TitleBox.ClearColors();
    Chart.ChartArea.ClearColors();
    

    //Add a series
    Chart.Series.SqlStatement= @"SELECT OrderDate,Total, Name FROM Orders  WHERE OrderDate >= #STARTDATE# AND OrderDate <= #ENDDATE# ORDER BY OrderDate";
    Chart.DefaultSeries.DefaultElement.ShowValue=true;
	Chart.Series.SplitByLimit="3";
    Chart.SeriesCollection.Add();

}
</script>
<HTML><HEAD><TITLE>Sales Report</TITLE></HEAD>
<BODY>
<DIV align=center>
 <dotnet:Chart id="Chart"  runat="server"/>
</DIV>
</BODY>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -