public ActionResult Index() { int y = 100; int x = 100; DataTable dt = ChDb.FSelectVendor(); IEnumerable<vendor> emp; emp = (from DataRow row in dt.Rows select new Vendor { id = Convert.ToInt32(row["VeId"].ToString()) }).ToList(); Chart chart = new Chart(200, 200).AddTitle("Cool graph").AddSeries(chartType:"pie").DataBindTable(dataSource: emp,xField:"VendorId"); this.ViewBag.Chart = chart; return View(); } Class Vendor { public int id{get;set;} }
@ViewBag.Chart.Write()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)