@using System.Data;
@{
DataSet dataSet = new DataSet();
dataSet.ReadXmlSchema(Server.MapPath("data.xsd"));
dataSet.ReadXml(Server.MapPath("data.xml"));
DataView dataView = new DataView(dataSet.Tables[0]);
Chart myChart = new Chart(width: 600, height: 400)
.AddTitle("按员工销售额")
.AddSeries("Default", chartType: "Pie",
xValue: dataView, xField: "Name",
yValues: dataView, yFields: "Sales")
.Write();
}