public ActionResult tick() { allobjet o = new allobjet(); String id = o.find(); StatByTicket s = new StatByTicket(); List <String> name = new List <string>(); foreach (var i in s.find_all(id)) { name.Add(i.etatticket); } List <int> nb = new List <int>(); foreach (var i in s.find_all(id)) { nb.Add(i.NbTick); } new Chart(width: 400, height: 400).AddSeries( chartType: "column", xValue: name, yValues: nb ).Write("png"); return(null); }
public ActionResult charttechnicienpie() { allobjet o = new allobjet(); String id = o.find(); StatByTechnicien s = new StatByTechnicien(); List <String> name = new List <string>(); Ticket t = new Ticket(); int pors = 0; foreach (var i in s.find_all(id)) { pors = pors + i.NbTick; } foreach (var i in s.find_all(id)) { int p = (i.NbTick * 100) / pors; name.Add(i.tichnicien.Nom + "" + p + "%"); } List <int> nb = new List <int>(); foreach (var i in s.find_all(id)) { nb.Add(i.NbTick); } new Chart(width: 350, height: 350).AddSeries( chartType: "pie", xValue: name, yValues: nb ).Write("png"); return(null); }
public ActionResult propie() { allobjet o = new allobjet(); String mytheme = @" <Chart BackColor = ""Transparent""> <ChartAreas><ChartArea Name=""Defult"" BackColor=""Transparent""></ChartArea> </ChartAreas> </Chart>"; String id = o.find(); StatByProbleme s = new StatByProbleme(); List <String> name = new List <string>(); foreach (var i in s.find_all(id)) { name.Add(i.probleme.ObjetProbleme); } List <int> nb = new List <int>(); foreach (var i in s.find_all(id)) { nb.Add(i.Nbp); } new Chart(width: 400, height: 400).AddSeries( chartType: "pie", xValue: name, yValues: nb ).Write("png"); return(null); }
public ActionResult pro() { allobjet o = new allobjet(); String id = o.find(); StatByProbleme s = new StatByProbleme(); List <String> name = new List <string>(); foreach (var i in s.find_all(id)) { name.Add(i.probleme.ObjetProbleme); } List <int> nb = new List <int>(); foreach (var i in s.find_all(id)) { nb.Add(i.Nbp); } if (s.find_all(id).Count() == 0) { ViewBag.val2 = 0; } new Chart(width: 400, height: 400).AddSeries( chartType: "column", xValue: name, yValues: nb ).Write("png"); return(null); }