mardi 7 avril 2015

plot not starting from 0 mschart c#

I have written the following code to plot data from text file.The plot starts from 1 even when i use chart1.Series[0].Points.AddXY(j,data); (increment j from 0 )


I need the plot to start from 0.How can I achieve this.Thanks in advance. nameArray = buffer.Split(new string[] { ";","\n","\r"}, StringSplitOptions.RemoveEmptyEntries);



for(int i=0;nameArray[i]!=null;i++)
plotting(float.Parse(nameArray[i]));
}


void plotting(float data)//, int t, int data1, int t1) {



MethodInvoker action1 = delegate
{


chart1.Series[0].Points.Add(data);




textBox2.Text = data.ToString();



};

this.BeginInvoke(action1);

Aucun commentaire:

Enregistrer un commentaire