ProjectsForTest/WinForm.NET5TeeChart-NET-Pro-Samples/Series/Fastline_DrawAll.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Steema.TeeChart.Samples
{
public class FastLine_DrawAll : Steema.TeeChart.Samples.BaseForm
{
private Steema.TeeChart.Styles.FastLine fastLineSeries1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.RadioButton radioButton2;
private System.ComponentModel.IContainer components = null;
public FastLine_DrawAll()
{
// This call is required by the Windows Form Designer.
InitializeComponent();
const int numPoints = 100000;
this.fastLineSeries1.GetHorizAxis.SetMinMax(0,numPoints-1);
// tell Series1 to draw non-repeated points only ( much faster ! )
this.fastLineSeries1.DrawAllPoints = false;
// this.tChart1.Axes.FastCals = true;
// lets generate 1E+5 points }
#if VS2005 && NULLABLE
double?[] myX = new double?[numPoints];
double?[] myY = new double?[numPoints];
#else
double[] myX = new double[numPoints];
double[] myY = new double[numPoints];
#endif
System.Random r = new System.Random();
double tmp = r.NextDouble()*10000;
for (int t=0; t<numPoints; t++)
{
tmp += r.Next(100)-49.5;
myX[t] = t;
myY[t] = tmp;
}
// now add points to series
this.fastLineSeries1.XValues.Count = numPoints;
this.fastLineSeries1.XValues.Value = myX;
this.fastLineSeries1.YValues.Count = numPoints;
this.fastLineSeries1.YValues.Value = myY;
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。