How to get a position of point on series in chart c#

Viewed 64

I'm trying to get a position of a chart point and I can get the y, but I can not get the x, it says the X is equal to 0

int CN = 0;
private void button2_Click(object sender, EventArgs e)
        {
            CN++;
            chart1.Series["Series2"].Points[0].XValue=chart1.Series["Series1"].Points[CN].XValue;
            chart1.Series["Series2"].Points[0].YValues=chart1.Series["Series1"].Points[CN].YValues;
            
        }
0 Answers
Related