private void CreateChartFunction() { chart1.Series[0].Points.Clear(); double x, func; for (int n = 0; n < SAMPLE_RATE * SECONDS; n++) { x = (double)n / SAMPLE_RATE; func = _signal.GetVolume(x); chart1.Series[0].Points.AddXY(x, func); } }