//EmployeeChart.Axes.Clear();
//EmployeeChart.Series.Clear();
ObservableCollection<EmployeeInfo> list = EmployeeViewModel.GetEmployeeList();
Action<Chart> chartModify = (chart) => {
CategoryAxis dateAxis = new CategoryAxis { Orientation = AxisOrientation.X, Title="雇员名称",FontStyle = FontStyles.Italic,FontSize = 12,ShowGridLines = true};
EmployeeChart.Axes.Add(dateAxis);
CategoryAxis valueAxis = new CategoryAxis { Orientation = AxisOrientation.Y , Title="薪水", ShowGridLines = true};
EmployeeChart.Axes.Add(valueAxis);
};
foreach (var item in list)
{
ColumnSeries series = new ColumnSeries();
series.ItemsSource = item.Cost;
series.IndependentValueBinding = null;// new System.Windows.Data.Binding("EmployeeName");
series.DependentValueBinding = null;// new System.Windows.Data.Binding("Salary");
series.AnimationSequence = AnimationSequence.FirstToLast;
series.Title = item.EmployeeName + " ID : " + item.EmployeeID;
EmployeeChart.Series.Add(series);
}