Subin Thomas

Subin Thomas

  • NA
  • 4.9k
  • 116.5k

pie chart is not visible

Mar 11 2019 12:15 AM
i have code for a pie chart but ehn i run i cant see the pie chartit showig white box when i drag the pie chart area the code is below plz help me
  1. "Chart1" runat="server" ImageType="Jpeg">  
  2.           
  3.             "Series1" ChartType="Pie" IsValueShownAsLabel="True">  
  4.               
  5.           
  6.           
  7.             "ChartArea1">  
  8.                 "True" LightStyle="Realistic" />  
  9.               
  10.           
  11.      
 and the code behind is :
 
  1. SqlConnection con = new SqlConnection(ppd);  
  2.             SqlCommand cmd = new SqlCommand("Some query, con);  
  3.   
  4.             
  5.             cmd.Parameters.AddWithValue("@userid", output);  
  6.                 Series series = Chart1.Series["Series1"];  
  7.                 con.Open();  
  8.                 SqlDataReader rdr = cmd.ExecuteReader();  
  9.                 while (rdr.Read())  
  10.                 {  
  11.                     series.Points.AddXY(rdr["schemeid"].ToString(), rdr["scheme"]);  
  12.                 } 
 

Answers (4)