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

📄 multicolorarea.aspx

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

<HTML><HEAD><TITLE>Multi Color Area</TITLE>
<script runat="server">


Sub Page_Load(sender As [Object], e As EventArgs)
   
   Chart.Type = ChartType.Combo 'Horizontal;
   Chart.Width = Unit.Parse(600)
   Chart.Height = Unit.Parse(350)
   Chart.Use3D = True
   Chart.TempDirectory = "temp"
   
   ' This sample wil demonstrate how you can color an element in each series so you can do without the x axis.
   ' First we get our data, if you would like to get the data from a database you need to use
   ' the data engine. See sample: features/dataEngine.aspx.
   Dim mySeries As Series = getRandomData()
   
   ' By setting a palette to this series it will instruct the chart engine to color each of it's elements
   ' and place each element into the legend and remove the series.
   mySeries.PaletteName = Palette.Three
   
   ' We can also mark any element with any color.
   mySeries.Elements(3).Color = Color.Red
   mySeries.Elements(3).Name = "Red One"
   
   ' Set the default series type to area line.
   Chart.DefaultSeries.Type = SeriesType.AreaLine
   
   ' A bit transparency almost always makes the chart look better so we add some here.
   Chart.DefaultSeries.DefaultElement.Transparency = 25
   
   ' Add the random data.
   Chart.SeriesCollection.Add(mySeries)
End Sub 'Page_Load
 


Function getRandomData() As Series
   Dim myR As New Random()
   
   Dim s As New Series()
   s.Name = "Clicks"
   Dim b As Integer
   For b = 1 To 7
      Dim e As New Element()
      e.Name = "Element " + b.ToString()
      e.YValue = myR.Next(50)
      s.Elements.Add(e)
   Next b
   
   Return s
End Function 'getRandomData
</script>
</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 + -