title: redirect from Asp.net chart control
body: <p>I am trying to display a pie chart in my asp.net application, for this am getting values from my sql database, I've two columns named Section,Absentees....and the valued for these columns are like</p>
  
  <pre><code>Section          Absentees
  -------          ---------
    A                 10
   MCA                 5
  </code></pre>
  
  <p>like this, and my script is,</p>
  
  <pre><code>&lt;asp:Chart ID="Chart1" runat="server" Height="202px" Width="291px"&gt;
      &lt;Series&gt;
          &lt;asp:Series ChartType="Pie" XValueMember="Section" YValueMembers="Absentees" Legend="Legend1" Name="Series1"&gt;&lt;/asp:Series&gt;
      &lt;/Series&gt;
      &lt;ChartAreas&gt;
          &lt;asp:ChartArea Name="ChartArea1"&gt;&lt;/asp:ChartArea&gt;
      &lt;/ChartAreas&gt;
      &lt;Legends&gt;
          &lt;asp:Legend Name="Legend1"&gt;&lt;/asp:Legend&gt;
      &lt;/Legends&gt;
  &lt;/asp:Chart&gt;
  </code></pre>
  
  <p>When I try like this, am getting the "Section" only in the Chart and in the Legend like,</p>
  
  <p><img src="https://i.stack.imgur.com/01wmf.png" alt="enter image description here"></p>
  
  <p>I need to display the "Section" in Legend and "Absentees" count in the Chart, how can I do this?</p>
  
  <p>And one more thing, is it possible to redirect to another page if I click in the chart? (for ex: if I click 5 or 10 it should redirect to someother page with the value(10 or 5) as query string) is it possble?</p>
  
  <p>I just included <code>IsValueShownAsLabel="true"</code> in my Series, and the values are displaying fine, and I can redirect to some page when I click on particular label by using <code>LabelUrl="/Default.aspx"</code> like this.</p>
  
  <p>Now the question is how can I pass the value as QueryString, I tried like</p>
  
  <pre><code>LabelUrl="/Default.aspx?value=&lt;%# Eval("Section")%&gt;"
  </code></pre>
  
  <p>but its showing error, am trying this chart in my WebParts control.....how can I fix this..any help?</p>