📄 legendbox.aspx
字号:
<%@ Page Language="C#" debug="true" 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.Title ="Orders By Customers";
Chart.DefaultSeries.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;user id=admin;password=;data source=" + Server.MapPath("../../database/chartsample.mdb");
Chart.XAxis.Label.Text="Customers";
Chart.TempDirectory="temp";
Chart.Debug=true;
Chart.Use3D=true;
//Set TitleBox
Chart.LegendBox.Background = new Background(System.Drawing.Color.SkyBlue);
Chart.LegendBox.CornerBottomLeft = BoxCorner.Square;
Chart.LegendBox.CornerBottomRight = BoxCorner.Square;
Chart.LegendBox.CornerTopLeft = BoxCorner.Square;
Chart.LegendBox.CornerTopRight = BoxCorner.Cut;
Chart.LegendBox.IconPath="icon.gif";
Chart.LegendBox.Label = new dotnetCHARTING.Label("",new Font("Arial",10),Color.DarkSlateBlue);
Chart.LegendBox.Line = new Line(Color.Blue);
Chart.LegendBox.Position = LegendBoxPosition.Top;
//Chart.LegendBox.Shadow.Color = Color.LightBlue;
//Chart.LegendBox.Shadow.Depth=5;
//Add a series
Chart.Series.Name="Orders";
Chart.Series.SqlStatement= @"SELECT Name,Sum(1) FROM Orders GROUP BY Name ORDER BY Sum(1) DESC";
Chart.SeriesCollection.Add();
}
</script>
<HTML><HEAD><TITLE>Orders 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 + -