Hello,
what I'm trying to do is changing values of the series.
It means that I would like to do something like this:
double[] XS=new double[7];
XS[0]=1000;
XS[1]=2000;
XS[2]=4000;
XS[3]=8000;
XS[4]=16000;
XS[5]=32000;
XS[6]=64000;
atgGraph.Series[0].ValuesLists[1].Clear();
atgGraph.Series[0].ValuesLists[1].Value=XS;
atgGraph.Refresh ();
If the Series[0] allready contains more than 7 elements I get an "index error". Do you know the right way to set the values of the series, even if number of elemnts changes.
Thanks a lot.
Stella Andrea.
Change values....
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hello Stella,
You'd better use something like the code below using series Clear method and any of the Series.Add overrides that supports arrays.
You'd better use something like the code below using series Clear method and any of the Series.Add overrides that supports arrays.
Code: Select all
private void button2_Click(object sender, System.EventArgs e)
{
double[] XS=new double[7];
XS[0]=1000;
XS[1]=2000;
XS[2]=4000;
XS[3]=8000;
XS[4]=16000;
XS[5]=32000;
XS[6]=64000;
atgGraph[0].Clear();
atgGraph[0].Add(XS);
}
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 |