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

📄 gaugeclock.aspx

📁 掌握学习.net开发的非常好的资料
💻 ASPX
字号:
<%@ Page Language="VB" Description="dotnetCHARTING Component" %>
<%@ Register TagPrefix="dotnet"  Namespace="dotnetCHARTING" Assembly="dotnetCHARTING"%>
<%@ Import Namespace="System.Drawing" %>
<HTML>
	<HEAD>
		<TITLE>.netCHARTING Sample</TITLE>
		<script runat="server">




Sub Page_Load(sender As [Object], e As EventArgs)
   
   Chart.Type = ChartType.Gauges 'Horizontal;
   Chart.Size = "600X400"
   Chart.TempDirectory = "temp"
   Chart.Debug = True
   Chart.Use3D = True
   Chart.ShadingEffect = True
   Chart.ShadingEffectMode = ShadingEffectMode.One
   ' Set the legend box and chart area colors to empty.
   Chart.LegendBox.Position = LegendBoxPosition.None
   Chart.ChartArea.ClearColors()
   ' Add a marker to the y axis to show the range of vales not trimmed from the second series.
   Chart.YAxis.Markers.Add(New AxisMarker("", New Background(Color.FromArgb(100, Color.SteelBlue)), 0, 12))
   Chart.YAxis.TickLabel.Font = new Font("Arial", 20)   
   
   
   ' Create a series
   Dim s As New Series("Time " + DateTime.Now.ToString("%h:mm"))
   Dim hourElement As New Element()
   hourElement.Name = "Hour"
   hourElement.YValue =(Convert.ToDouble(DateTime.Now.Hour) + DateTime.Now.Minute / 60.0) Mod 12
   hourElement.Length = 60
   s.Elements.Add(hourElement)
   
   Dim minutesElement As New Element("Minutes", DateTime.Now.Minute / 5.0)
   s.Elements.Add(minutesElement)
   
   
   Dim a As Axis = Chart.YAxis
   a.OrientationAngle = 0
   a.SweepAngle = 360
   a.Minimum = 0
   a.Maximum = 12
   a.Interval = 1
   
   
   ' Because 0 and 12 are in the same position we'll clear the '0' label.
   a.LabelOverrides.Add(New LabelOverride("0", ""))
   
   
   ' Add the random data.
   Chart.SeriesCollection.Add(s)
End Sub 'Page_Load 

        </script>
	</HEAD>
	<BODY>
		<div align="center">
			<dotnet:Chart id="Chart" runat="server" Width="568px" Height="344px">
			</dotnet:Chart>
		</div>
	</BODY>
</HTML>

⌨️ 快捷键说明

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