title: How to draw Line Chart Graphs in asp.net
body: <p>I have line chart in that I am unable to draw the last point of that graph. For example when I have three values in data table the graph only shows two values.</p>
  
  <p>This is what I tried:</p>
  
  <pre><code>string[] x = new string[dt.Rows.Count];
  decimal[] y = new decimal[dt.Rows.Count];
  
  for (int i = 0; i &lt; dt.Rows.Count; i++)
  {
      x[i] = dt.Rows[i][0].ToString();
      y[i] = Convert.ToInt32(dt.Rows[i][1]);
  }
  
  LineChart1.Series.Add(new AjaxControlToolkit.LineChartSeries { Data = y });
  LineChart1.CategoriesAxis = string.Join(",", x);
  LineChart1.Visible = true;
  
  if (x.Length &gt; 0)
  {
      LineChart1.ChartWidth = (x.Length * 100).ToString();
  }            
  </code></pre>