TeeChart入门

时间:2024-01-03 18:22:26

此链接可以作为参考http://tech.sina.com.cn/s/2008-07-07/1612722495.shtml

需要添加引用

using Steema.TeeChart;//tchart
using Steema.TeeChart.Styles;//bar

纯代码操作

TChart tChart1 = new TChart();
tChart1.Header.Lines = new string[] { "TeeChart" };
tChart1.Name = "tChart1";
tChart1.Dock = DockStyle.Fill;
tChart1.TabIndex = 0;

this.Controls.AddRange(new System.Windows.Forms.Control[] { tChart1 });//this是一个winform的窗体

Bar bar1 = new Bar();
bar1.Add(3, "Pears", Color.Red);
bar1.Add(4, "Apples", Color.Blue);
bar1.Add(2, "Oranges", Color.Green);

tChart1.Series.Add(bar1);

TeeChart入门