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

📄 fragmentcache.ascx

📁 掌握学习.net开发的非常好的资料
💻 ASCX
字号:
<%@ Control Language="VB" debug="true" Description="dotnetCHARTING Component"%>
<%@ Register TagPrefix="dotnet"  Namespace="dotnetCHARTING" Assembly="dotnetCHARTING"%>
<%@ Import Namespace="System.Drawing" %>
<%@ Outputcache Duration = "10" Varybyparam = "none"%>


<script runat="server">


Function getRandomData() As SeriesCollection
   Dim SC As New SeriesCollection()
   Dim myR As New Random()
   Dim a As Integer
   For a = 1 To 4
      Dim s As New Series()
      s.Name = "Series " + a.ToString()
      Dim b As Integer
      For b = 1 To 5
         Dim e As New Element()
         e.Name = "E " + b.ToString()
         e.YValue = myR.Next(50)
         s.Elements.Add(e)
      Next b
      SC.Add(s)
   Next a
   
   Return SC
End Function 'getRandomData



Sub Page_Load(sender As [Object], e As EventArgs)
   
   
   
   'Set file name 
   Chart.FileName = "fragmentcachesample"
   
   ' Set the title to the current time
   Dim Dt As DateTime = DateTime.Now
   Chart.Title = "This chart was created at " + Dt.ToString()
   
   ' 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"
   
   ' Set the directory where the images will be stored.
   Chart.TempDirectory = "temp"
   
   ' Set the bar shading effect
   Chart.ShadingEffect = True
   
   ' Set he chart size.
   Chart.Width = Unit.Parse(600)
   Chart.Height = Unit.Parse(350)
   
   Chart.Debug = True
   
   ' Add the random data.
   Chart.SeriesCollection.Add(getRandomData())
End Sub 'Page_Load 


</script>

 <dotnet:Chart id="Chart"  runat="server"/>

⌨️ 快捷键说明

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