Page 1 of 1

Dynamic Generation of Tee Chart at Runtime

Posted: Wed Jun 14, 2006 10:02 am
by 9524848
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.

Posted: Wed Jun 14, 2006 10:21 am
by narcis
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.

Posted: Thu Jun 15, 2006 4:58 pm
by 9641422
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()