title: get y value from c# chart series?
body: <p>I have chart series:</p>
  
  <pre><code>Series[] tempSeries = new Series[sensorNum];    // Series to hold current/past temperature data for plotting, for each sensor
  </code></pre>
  
  <p>I add new points to them:</p>
  
  <pre><code>tempSeries[i].Points.AddXY(current_time, temp_F[i]);        // Add new temperature data to series
  </code></pre>
  
  <p>Now I want to convert the series to string to send it via socket.</p>
  
  <p>The question is how to get Y value from the series?</p>
  
  <p>I tried this:</p>
  
  <pre><code>private string sendAll() {
          string myMsg = "";
          double[,] lastTemp = new double[4, 1200];
          double[,] lastWind = new double[4, 1200];
          for (int i = 0; i &lt; 4; i++) {
              for (int j = 0; j &lt; 1200; j++){
                  try
                  {
                      lastTemp[i, j] = tempSeries[i].Points[j].YValues[0];
                      myMsg += lastTemp[i, j] + " ";
                  }
                  catch (Exception ex) {
                      lastTemp[i, j] = 0;
                      myMsg += 0 + " ";
                  }
              }
          }
          myMsg += "; ";
  
          for (int i = 0; i &lt; 4; i++)
          {
              for (int j = 0; j &lt; 1200; j++)
              {
                  try
                  {
                      lastWind[i, j] = windSeries[i].Points[j].YValues[0];
                      myMsg += lastWind[i, j] + " ";
                  }
                  catch (Exception ex)
                  {
                      lastWind[i, j] = 0;
                      myMsg += 0 + " ";
                  }
              }
          }
          MessageBox.Show(myMsg);
  
          return myMsg;
      }
  </code></pre>
  
  <p>But my program is freezing...</p>