Code: Select all
/// <summary>
/// XYZ
/// </summary>
public class NumberAxis
{
public int X { get; set; }
public int Y { get; set; }
public int Z { get; set; }
}
private void Form2_Load(object sender, EventArgs e)[attachment=0]QQ截图20150922093643.png[/attachment]
{
List<NumberAxis> stemp = new List<NumberAxis>();
NumberAxis s1 = new NumberAxis() { X = 1, Y = 1, Z = 1 };
NumberAxis s2 = new NumberAxis() { X = 2, Y = 2, Z = 2 };
NumberAxis s3 = new NumberAxis() { X = 3, Y = 3, Z = 3 };
NumberAxis s4 = new NumberAxis() { X = 4, Y = 3, Z = 4 };
NumberAxis s5 = new NumberAxis() { X = 5, Y = 5, Z = 5 };
stemp.Add(s1);
stemp.Add(s2);
stemp.Add(s3);
stemp.Add(s4);
stemp.Add(s5);
points3D1.DataSource = stemp;
points3D1.XValues.DataMember = "X";
points3D1.XValues.DataMember = "Y";
points3D1.ZValues.DataMember = "Z";
tChart1.Refresh();
this.tChart1.Series[0].Marks.Visible = true;
this.tChart1.Series[0].Marks.Style = MarksStyles.XY;
}