ProjectsForTest/WinForm.NET5TeeChart-NET-Pro-Samples/Series/Surface_Irregular.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Steema.TeeChart.Samples
{
public class Surface_Irregular : Samples.BaseForm
{
private Steema.TeeChart.Styles.Surface surfaceSeries1;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.CheckBox checkBox2;
private Steema.TeeChart.Tools.GridBand gridBand1;
private System.ComponentModel.IContainer components = null;
public Surface_Irregular()
{
// This call is required by the Windows Form Designer.
InitializeComponent();
/*
* Arrays of X and Z values with sample points...
* The values have floating point decimals and define
* an irregular grid
*/
double [] xval = new double[10] {0.1, 0.2, 0.3, 0.5, 0.8, 1.1, 1.5, 2.0, 2.2, 3.0};
double [] zval = new double[10] {0.5, 0.6, 0.7, 0.75, 0.8, 1.1, 1.5, 2.0, 2.2, 5.6};
surfaceSeries1.IrregularGrid = true; // <---------- VERY IMPORTANT !!!
surfaceSeries1.GetVertAxis.SetMinMax(-2.0, 2.0); // axis scale for Y values
// Now add all "Y" points...
// An irregular grid of 10 x 10 cells
surfaceSeries1.NumXValues = 10;
surfaceSeries1.NumZValues = 10;
double y;
for (int x=0; x<9; x++) // = 10 rows
for (int z=0;z<9; z++) // = 10 columns
{
y = Math.Sin(z*Math.PI/10.0)*Math.Cos(x*Math.PI/5.0); // example Y value
surfaceSeries1.Add(xval[x],y,zval[z]);
}
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。