0

I want to create a delete button so when i press the delete button i can key in a new set of data and let it generate a new chart

private void button2_Click(object sender, EventArgs e)
    {

           chart1.Series.Clear();
    }

and I had tried

    private void button2_Click(object sender, EventArgs e)
    {
              chart1.Series["Data1"].Points.Clear();
             chart1.Series["Data2"].Points.Clear();
              chart1.Series["Total"].Points.Clear();

    }

What I have did so far

W.K
  • 13
  • 5
  • 2
    It would be awesome if you could provide a [mcve]. – mjwills Jun 18 '18 at 03:52
  • Please provide proper information such as which chats library have you used and stuff like that so fellow community members can help you quickly without wasting anyone's time – Mihir Dave Jun 18 '18 at 05:24
  • One way __will__ clear the Series so you need to re-add them along with data. The 2nd __will__ clear all data. What is not working?? Is the button code [hooked up](http://stackoverflow.com/questions/33275763/copy-datagridview-values-to-textbox/33276161?s=14|0.0000#33276161) ? – TaW Jun 18 '18 at 07:32
  • once i press the button it doesn't work and it states that there is data still present in the chart – W.K Jun 20 '18 at 03:21

0 Answers0