private void LoadChartData() { string strcon = ConfigurationManager.ConnectionStrings["gallup"].ConnectionString; //SqlConnection myConnection = new SqlConnection(strcon); string mystr = "select city, sample from city_breakup"; SqlDataAdapter da = new SqlDataAdapter(mystr, strcon); DataTable table = new DataTable(); da.Fill(table); DataView dv = table.DefaultView; Chart1.Series["Series1"].Points.DataBindXY(dv, "city", dv, "sample"); //Chart2.Series["Series1"].Points.DataBindXY(dv, "city", dv, "sample"); //Chart2.Series["Series1"].ChartType = SeriesChartType.Pie; //Chart2.Series["Series1"]["PieLabelStyle"] = "outside"; //Chart2.Series[0]["PieStartAngle"] = "190"; //Chart2.Legends.Add("Legend1"); // DataList1.DataSource = dv; //DataList1.DataBind(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)