📄 sales1.aspx
字号:
<%@ Page Language="VB" Description="dotnetCHARTING Component"%>
<%@ Register TagPrefix="dotnet" Namespace="dotnetCHARTING" Assembly="dotnetCHARTING"%>
<%@ Import Namespace="System.Drawing" %>
<script runat="server">
Sub Page_Load(sender As Object ,e As EventArgs )
'set global properties
Chart.DefaultSeries.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;user id=admin;password=;data source=" & Server.MapPath("../../database/chartsample.mdb")
'Chart.XAxis.FormatString ="%d"
Chart.TempDirectory="temp"
Chart.Debug=true
Chart.DefaultSeries.StartDate= New System.DateTime(2002,1,1,0,0,0)
Chart.DefaultSeries.EndDate = New System.DateTime(2002,1,20,23,59,59)
Chart.DefaultSeries.DefaultElement.ShowValue=true
Chart.DateGrouping = TimeInterval.Days
Chart.TitleBox.Label = new dotnetCHARTING.Label("Sales For January",new Font("Bold Garamond",9),Color.Red)
Chart.LegendBox.Label = new dotnetCHARTING.Label("",new Font("Arial",10),Color.Black)
Chart.XAxis.Label = new dotnetCHARTING.Label("Days",new Font("Bold Garamond",12),Color.Purple)
Chart.YAxis.Label = new dotnetCHARTING.Label("Dollars",new Font("Bold Garamond",12),Color.Green)
Chart.ChartArea.ValueLabel = new dotnetCHARTING.Label("",new Font("Garamond",12),Color.Black)
Chart.XAxis.TickLabel.Font = new Font("Bold Garamond",10)
Chart.XAxis.TickLabel.Color = Color.Goldenrod
Chart.YAxis.TickLabel.Font = new Font("Bold Garamond",10)
Chart.YAxis.TickLabel.Color = Color.DarkBlue
'Add a series
Chart.Series.Name="Sales"
Chart.Series.SqlStatement= "SELECT OrderDate,Total FROM Orders WHERE OrderDate >= #STARTDATE# AND OrderDate <= #ENDDATE# ORDER BY OrderDate"
Chart.SeriesCollection.Add()
End Sub
</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 + -