title: draw bar and line charts in chart control in asp.net
body: <pre><code>&lt;asp:Chart ID="chartSellThru" runat="server" Height="400px" Width="1200px" &gt;
      &lt;Series&gt;                       
          &lt;asp:Series Name="ActualsQTD"&gt;
          &lt;/asp:Series&gt;
          &lt;asp:Series Name="ForecastQTD"&gt;
          &lt;/asp:Series&gt;
          &lt;asp:Series Name="QTDRatio" ChartType="Line"&gt;
          &lt;/asp:Series&gt;
          &lt;asp:Series Name="TargetAttain" ChartType="Line"&gt;
          &lt;/asp:Series&gt;
      &lt;/Series&gt;
      &lt;ChartAreas&gt;
          &lt;asp:ChartArea Name="SellThruChartArea"&gt;
          &lt;/asp:ChartArea&gt;
      &lt;/ChartAreas&gt;
  
  chartSellThru.Series["ActualsQTD"].XValueMember = "ProductGroup";
  chartSellThru.Series["ActualsQTD"].YValueMembers = "ActualsQTD";
  </code></pre>
  
  <p>I have written above lines of code in default.aspx page, and last two lines of code is written in default.aspx.cs page. Data is binding to chart.</p>
  
  <p>How to write the code for line chart. Make sure values are binding from database.how to bind values from sql server to line chart.</p>