title: How can I display a line chart with only 1 data point
body: <p>I have a .net program that lets the user select a chart from a dropdown and a data range then queries sql for the data to display the chart, everything is fine unless they pick a date range that would only return 1 value for that particular chart.</p>
  
  <p>When this happens since there is only 1 point on the graph it does not display anything for line or area charts (it does work on bar and column). </p>
  
  <p>i have thought about forcing the graph type to column if there is only 1 data point but was wondering if there was a setting i am missing that would allow a straight line on a line graph if there was only 1 datapoint.</p>
  
  <p>well based on the idea of faking a 2nd point i came up with this that technically does what i want it to do. </p>
  
  <p>this is called when there is only 1 point </p>
  
  <pre><code> foreach (Series ser in mainChart.Series)
   {
       ser.Points.AddY(ser.Points[0].YValues[0]);
   }
  </code></pre>
  
  <p>I thought i might should add in case anyone else needs this that the code above needs to be after the chart has been DataBound (had .DataBind() called). </p>