Hi,
change the method code:-
private void chart()
{
chart1.Series["new"].Points.AddXY("Peter", "1000");
chart1.Series["new"].Points.AddXY("Julia", "1000");
}
with this:-
private void chart()
{
chart1.Series.["new"].Points.Clear();
chart1.Series["new"].Points.AddXY("Peter", "1000");
chart1.Series["new"].Points.AddXY("Julia", "1000");
}
As @BillWoodruff says that every time you call the
chart()
method it added the extra points to your chart, so you need to clear the all the previous points and then add new points to the chart..