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

📄 arraylist.aspx

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

<script runat="server">

Sub Page_Load(sender As [Object], e As EventArgs)
   'set global properties
   Chart.Title = "Item sales report"
   
   ' Set the x axis label
   Chart.ChartArea.XAxis.Label.Text = "X Axis Label"
   
   ' Set the y axis label
   Chart.ChartArea.YAxis.Label.Text = "Y Axis Label"
   Chart.TempDirectory = "temp"
   Chart.Debug = True
   
   
   'Adding series programatically
   Chart.Series.Name = "Item sales"
   Chart.Series.DataFields = "xAxis=Name,yAxis=Total"
   Chart.Series.Data = CreateArrayList()
   Chart.SeriesCollection.Add()
End Sub 'Page_Load
 


Function CreateArrayList() As ArrayList
   Dim myArrayList As New ArrayList()
   myArrayList.Add(New Product("P1", 44))
   myArrayList.Add(New Product("P2", 12))
   myArrayList.Add(New Product("P3", 20))
   myArrayList.Add(New Product("P4", 65))
   myArrayList.Add(New Product("P5", 50))
   myArrayList.Add(New Product("P6", 40))
   
   Return myArrayList
End Function 'CreateArrayList
 _
Public Class Product
   Private nameField As String
   Private totalField As Double
   
   Public Sub New()
   End Sub 'New
   
   Public Sub New(proName As String, proTotal As Double)
      nameField = proName
      totalField = proTotal
   End Sub 'New
   
   
   
   Public Property Name() As String
      Get
         Return nameField
      End Get
      Set
         nameField = value
      End Set
   End Property
   
   Public Property Total() As Double
      Get
         Return totalField
      End Get
      Set
         totalField = value
      End Set
   End Property
End Class 'Product 
</script>
<HTML><HEAD><TITLE>ArrayList Sample</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 + -