这是我写入数据的代码:
#region
Random nex = new Random();
// 创建数据源
List<DataPoint> categorySales1 = new List<DataPoint>
{
new DataPoint(nex.Next(0,10), nex.Next(0,10), nex.Next(0,1200)),
new DataPoint(nex.Next(0,10), nex.Next(0,10), nex.Next(0,1200)),
new DataPoint(nex.Next(0,10), nex.Next(0,10), nex.Next(0,2200)),
new DataPoint(nex.Next(0,10), nex.Next(0,10), nex.Next(0,1200)),
new DataPoint(nex.Next(0,10), nex.Next(0,10), nex.Next(0,1200))
};
#endregion
grid.RowCount = 11;
grid.ColumnCount = 11;
for (int i = 0; i < categorySales1.Count; i++)
{
var point = categorySales1[i];
grid[Convert.ToInt32(point.X), Convert.ToInt32(point.Y)] = point.Z;
textBox1.Text += point.X + "," + point.Y + "," + point.Z + "\r\n";
}
c1Chart3D1.UseAntiAliasedGraphics = true;//获取或设置一个值,该值指示在呈现时是否使用抗锯齿 |