I create a pie chart from reading an excel file. There are percentage on circle chart area,but the same percentage character showed on legend. Some codes as below. How can I fill the label of legend with the other data (title_label) ?
=====================================================
String strCon = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source=d:\\wwwroot_adams_test\\db\\2009.xls; Extended Properties=\"Excel 8.0; HDR=NO\"";
OleDbConnection objConn = new OleDbConnection(strCon);
string strCom = " SELECT * FROM [job$] ";
objConn.Open();
OleDbDataAdapter objCmd = new OleDbDataAdapter(strCom, objConn);
DataSet objDS = new DataSet();
objCmd.Fill(objDS);
objConn.Close();
string data, title_label;
for (int i = 0; i < objDS.Tables[0].Columns.Count-1; i++ )
{
data = objDS.Tables[0].Rows[54][i].ToString();
title_label = objDS.Tables[0].Rows[1][i].ToString();
Chart2.Series["Series1"].Points.Add(Convert.ToDouble(data));
}
======================================================