title: How to auto update chart's X-axis every 5 sec?
body: <p>I am quite new to using the chart coding.But i manage to display chart on a click of the button. And 2nd click will change the "x-axis" as i set it as time.</p>
  
  <p>Is there a way to auto update every 5 for the "X-axis" ?? As i know timer is needed to set the interval timing.</p>
  
  <pre><code>private void timer1_Tick(object sender, EventArgs e)
  {
      timer1.Start();
      this.Time.Text = System.DateTime.Now.ToString("hh:mm:ss tt");
  }
  
  private void GetData_Click(object sender, EventArgs e)
  {
      sqlite_con1.Open();
      try
      {
          sqlite_cmd = sqlite_con1.CreateCommand();
          sqlite_cmd.CommandText = "SELECT * FROM Temperature where id=12";
          sqlite_reader = sqlite_cmd.ExecuteReader();             
          while (sqlite_reader.Read()) 
          {
             this.chart1.Series["SAT"].Points.AddXY(Time.Text, sqlite_reader["Temp"]);      
          }
      }  
      catch (Exception ex)
      {   
          MessageBox.Show(ex.Message);   
      }
      sqlite_con1.Close();
   }
  </code></pre>
  
  <p>Any help is much appreciated. Thanks.</p>