Dynamic Generation of Tee Chart at Runtime
Dynamic Generation of Tee Chart at Runtime
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.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Roger,
To dynamically create TeeChart components in WinForms applications you can do:
To create them in WebForms applications please have a look at this thread.
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);
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
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()
{
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()