jeudi 3 mars 2016

Using checkboxes to delete lines off line graph C# Form Application

I have a graph that has lines plotted on it from different lists. I have added several checkboxes and used if statements to check if the checkbox is clicked. Like so :

    public Form1()
    {           
        InitializeComponent();
        CreateGraph();
        this.Text = "HRM File Analyser";

        if (hrCheck.Checked)
        {
            drawHR();
            chart1.Update();
        }
        else if (!hrCheck.Checked)
        {
            chart1.Series["Heart Rate"].Points.Clear();
            chart1.Update();
        }
    }  

However, even after calling the update method nothing changes at all.

Anyone have any ideas?

Thankyou




Aucun commentaire:

Enregistrer un commentaire