h04.aspx

来自「掌握学习.net开发的非常好的资料」· ASPX 代码 · 共 51 行

ASPX
51
字号
<%@ Page Language="VB" Description="dotnetCHARTING Component" %>
<%@ Register TagPrefix="dotnet"  Namespace="dotnetCHARTING" Assembly="dotnetCHARTING"%>
<%@ Import Namespace="System.Drawing" %>
<%@ Import Namespace="System.Drawing.Drawing2D" %>


<script runat="server">

Sub Page_Load(sender As [Object], e As EventArgs)
   ' Set the title.
   Chart.Title = "My Chart"
   
   ' Set the directory where images are temporarily be stored.
   Chart.TempDirectory = "temp"
   
   ' Disable the legend box
   Chart.LegendBox.Position = LegendBoxPosition.None
   
   ' Set a default gauge face background color.
   Chart.DefaultSeries.Background.Color = Color.LightGray
   
   ' Set he chart size.
   Chart.Size = "600x350"
   
   ' Specify the gauges chart type
   Chart.Type = ChartType.Gauges
   
   ' Create a series with a single element
   Dim s1 As New Series("series 1", New Element("", 120))
   
   ' Create a series with a single element
   Dim s2 As New Series("series 2", New Element("", 30))
   
   ' Create a series with a single element
   Dim s3 As New Series("series 3", New Element("", 50))
   
   ' Add the series
   Chart.SeriesCollection.Add(s1)
   Chart.SeriesCollection.Add(s2)
   Chart.SeriesCollection.Add(s3)
End Sub 'Page_Load 

</script>
<HTML><HEAD><TITLE>Gallery Sample</TITLE></HEAD>
<BODY>
<DIV align=center>
 <dotnet:Chart id="Chart"  runat="server"/>
</DIV>
</BODY>
</BODY>
</HTML>

⌨️ 快捷键说明

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