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

📄 axislogbases.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.TempDirectory = "temp"
	Chart.Debug = true
	Chart2.TempDirectory = "temp"
	Chart2.Debug = true
	Chart3.TempDirectory = "temp"
	Chart3.Debug = true
	Chart.Title = "Logarithmic Base: 2"	
	Chart2.Title = "Logarithmic Base: 5"
	Chart3.Title = "Logarithmic Base: 10"
		
	' This sample will demonstrate using log scales with different logarithmic bases.

	' 1. SET SCALE TO LOGARITHMIC
	Chart.YAxis.Scale = Scale.Logarithmic
	Chart2.YAxis.Scale = Scale.Logarithmic	
	Chart3.YAxis.Scale = Scale.Logarithmic	
	
	' 2. SET LOG BASES
	Chart.YAxis.LogarithmicBase = 2
	Chart2.YAxis.LogarithmicBase = 5
	Chart3.YAxis.LogarithmicBase = 10

	' 3. ADD DATA
	' *DYNAMIC DATA NOTE* 
	' This sample uses random data to populate the chart. To populate 
	' a chart with database data see the following resources:
	' - Classic samples folder
	' - Help File > Data Tutorials
	' - Sample: features/DataEngine.aspx
	Chart.SeriesCollection.Add(getRandomData())
	Chart2.SeriesCollection.Add(getRandomData())
	Chart3.SeriesCollection.Add(getRandomData())
    
End Sub



Function  getRandomData() As SeriesCollection
	
		
	Dim SC As SeriesCollection  = new SeriesCollection()
	Dim myR as Random  = new Random()
	Dim a,b As Integer
	Dim s As Series 
	Dim e As Element	
	
	For a = 0 To 0
	
		s = new Series()
		s.Name = "Series " & a
		For  b = 0 To 3
		
			e = new Element()
			e.Name = "Element " & b
			e.YValue = myR.Next(50)
			'e.XValue = b*2

			s.Elements.Add(e)
		Next b
		SC.Add(s)
	Next a

	return SC
End Function
		</script>
	</HEAD>
	<BODY>
		<DIV align="center">
			<dotnet:Chart id="Chart" runat="server" Width="568px" Height="344px">
			</dotnet:Chart>
			<dotnet:Chart id="Chart2" runat="server" Width="568px" Height="344px">
			</dotnet:Chart>
			<dotnet:Chart id="Chart3" runat="server" Width="568px" Height="344px">
			</dotnet:Chart>
		</DIV>
	</BODY>
</HTML>

⌨️ 快捷键说明

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