I need to plot a Point series during runtime that depends on what the user selects. The idea is that only one series is displayed at a time. Therefor, e.g. user selects series A, which is plotted, then the user selects Series B which is then plotted, while series A is removed. I've used Clear(), but it doesn't remove Series A at all.
Regards,
Casper JH Erasmus
Series.Clear() Problem
-
- Newbie
- Posts: 17
- Joined: Wed Oct 13, 2004 4:00 am
- Location: South Africa
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Casper JH Erasmus,
Clear method deletes series values, colors, labels, etc. To delete the series you'd better use Remove method as shown here:
Clear method deletes series values, colors, labels, etc. To delete the series you'd better use Remove method as shown here:
Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.FillSampleValues();
tChart1.Header.Text = tChart1.Series.Count.ToString();
}
private void button1_Click(object sender, EventArgs e)
{
tChart1.Series.Remove(tChart1[0]);
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.FillSampleValues();
tChart1.Header.Text = tChart1.Series.Count.ToString();
}
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 |