2010-08-02 75 views

回答

2
var employees = new Dictionary<int, string> 
{ 
    {10,"Employee 1"},{20,"Employee 2"},{30,"Employee 3"} 
}; 

Chart1.Series[0].ChartType = System.Web.UI.DataVisualization.Charting.SeriesChartType.Bar; 

foreach (KeyValuePair<int, string> employee in employees) 
    Chart1.Series[0].Points.AddXY(employee.Value, employee.Key); 

輸出:

Chart

相關問題