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

📄 defaultvb.aspx.vb

📁 Telerik是很大的第三方软件制造商
💻 VB
字号:
Imports Telerik.QuickStart
Imports Telerik.WebControls

Namespace Telerik.ChartExamplesVB.Functionality.NumericalAxis
    Public Class DefaultVB
        Inherits XhtmlPage

        Protected RadChart1 As Telerik.WebControls.RadChart

        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            If Not Page.IsPostBack Then
                Const hourStep As Double = 1 / 24.0
                Const minuteStep As Double = hourStep / 60
                Const fiveMinuteStep As Double = minuteStep * 5

                Dim startTime As Double = New DateTime(2004, 1, 1, 8, 0, 0, 0).ToOADate()
                Dim endTime As Double = New DateTime(2004, 1, 1, 18, 0, 0, 0).ToOADate()

                RadChart1.XAxis.AutoScale = False
                RadChart1.XAxis.AddRange(startTime, endTime, hourStep)
                RadChart1.Gridlines.HorizontalGridlines.Visible = True

                RadChart1.YAxis.IsZeroBased = False

                Dim r As New Random()
                Dim s As ChartSeries = RadChart1.GetChartSeries(0)
                s.Items.Clear()

                Dim currentTime As Double = startTime + fiveMinuteStep

                Dim i As Integer
                For i = 0 To 99
                    Dim item As New ChartSeriesItem()

                    item.XValue = currentTime + (r.NextDouble() - 0.5) * fiveMinuteStep
                    item.YValue = 7065 + (r.NextDouble() - 0.5) * 90

                    currentTime += fiveMinuteStep

                    s.Items.Add(item)
                Next i
            End If
        End Sub 'Page_Load 

#Region "Web Form Designer generated code"

        Protected Overrides Sub OnInit(ByVal e As EventArgs)
            '
            ' CODEGEN: This call is required by the ASP.NET Web Form Designer.
            '
            InitializeComponent()
            MyBase.OnInit(e)
        End Sub 'OnInit


        '/		Required method for Designer support - do not modify
        '/		the contents of this method with the code editor.
        '/ </summary>
        Private Sub InitializeComponent()

        End Sub 'InitializeComponent

#End Region

    End Class
End Namespace

⌨️ 快捷键说明

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