<div>
<asp:Chart ID="Chart1" runat="server" Width="500px">
<Series>
<asp:Series Name="Education" XValueMember="name" YValueMembers="currency"
IsVisibleInLegend="true" ChartType="Pie">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea Name="ChartArea1" Area3DStyle-Enable3D="true">
<AxisX LineColor="DarkGray">
<MajorGrid LineColor="LightGray" />
</AxisX>
<AxisY LineColor="DarkGray">
<MajorGrid LineColor="LightGray" />
</AxisY>
<Area3DStyle Enable3D="True"></Area3DStyle>
</asp:ChartArea>
</ChartAreas>
<Legends>
<asp:Legend>
</asp:Legend>
</Legends>
</asp:Chart>
</div>
private void CreateChart()
{
SqlConnection sqlconn = new SqlConnection(connection);
SqlCommand cmd = new SqlCommand();
cmd.Parameters.AddWithValue("@Queryno", "3");
cmd.CommandText = "Satish_Pro";
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.Connection = sqlconn;
SqlDataAdapter adp = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
adp.Fill(ds);
if (ds.Tables[0].Rows.Count > 0)
{
Chart1.DataSource = ds;
Chart1.DataBind();
}
}