Imports System.Math
Imports System.Windows.Forms.DataVisualization.Charting
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim fs As Integer
Dim x As Double
fs = 500
With Chart1.ChartAreas(0)
For n As Integer = 1 To fs
x = 50 + 10 * Math.Cos(0.1 * n)
Chart1.Series(0).Points.AddXY(n * fs / .AxisX.Maximum, x)
Next
End With
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
With Chart1.ChartAreas(0)
.AxisX.LabelStyle.Enabled = True
'.AxisX.IsLogarithmic = True
.AxisX.LogarithmBase = 10
.AxisX.MajorGrid.LineColor = Color.LightGray
.AxisY.MajorGrid.LineColor = Co
显示无数据源的Chart对数表
最新推荐文章于 2022-08-15 16:38:43 发布