Dynamic Generation of Tee Chart at Runtime

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Roger
Newbie
Newbie
Posts: 23
Joined: Thu Nov 11, 2004 5:00 am
Location: Dallas

Dynamic Generation of Tee Chart at Runtime

Post by Roger » Wed Jun 14, 2006 10:02 am

Please help me in generation of Tee Chart Dynamically. I don't want to put tee chart at design time. What i want is to generate tee chart dynamically based on some data returned differently at different time.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jun 14, 2006 10:21 am

Hi Roger,

To dynamically create TeeChart components in WinForms applications you can do:

Code: Select all

      Steema.TeeChart.TChart tChart2 = new Steema.TeeChart.TChart();
      tChart2.Parent = this;
      tChart2.Location = new System.Drawing.Point(50, 50);
      tChart2.Size = new System.Drawing.Size(400, 300);
To create them in WebForms applications please have a look at this thread.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Amol
Advanced
Posts: 176
Joined: Mon May 29, 2006 12:00 am

Post by Amol » Thu Jun 15, 2006 4:58 pm

public void PopulateLinesForGraph()
{
line1 = new Steema.TeeChart.Styles.Line();
line2 = new Steema.TeeChart.Styles.Line();
for(int i=0;i<s1.Length;i++)
line1.Add(s1,s2);
for(int i=0;i<s1.Length;i++)
line2.Add(s1,s2);
line1.Color = Color.Red;
line1.Title = "units"
line1.LineHeight = 40;
line2.Color = Color.Blue;
line2.Title = "units)";

}

private void PopulateLinesOnChart()
{
WebChart1.Chart.Series.Add(line1);
WebChart1.Chart.Series.Add(line2);
}

call these methods in main()

Post Reply