예제 #1
0
        public ActionResult ChartProduit()
        {
            var model    = new EspaceAdminController();
            var dataView = db.Candidats.ToList();
            var nbr      = db.Candidats.Count(p => p.filiere_choisie == "Génie informatique");
            var nbr1     = db.Candidats.Count(p => p.filiere_choisie == "Génie procede");
            var nbr2     = db.Candidats.Count(p => p.filiere_choisie == "Génie industrielle");
            var nbr3     = db.Candidats.Count(p => p.filiere_choisie == "Génie tElecome");

            string[] xv      = { "Genie Informatique", "Génie Telecome", "Génie Procéde", "Génie Industrielle" };
            int[]    yv      = { nbr, nbr3, nbr1, nbr2 };
            var      Mychart = new Chart(width: 600, height: 400, theme: ChartTheme.Vanilla3D)
                               .AddSeries("Default", chartType: "pie",
                                          xValue: xv,
                                          yValues: yv)
                               .Write("png");

            return(null);
        }
예제 #2
0
        public ActionResult chartdeplome()
        {
            var model    = new EspaceAdminController();
            var dataView = db.Candidats.ToList();
            var nbr      = db.Candidats.Count(p => p.diplome == "DUT");
            var nbr1     = db.Candidats.Count(p => p.diplome == "DUG");
            var nbr2     = db.Candidats.Count(p => p.diplome == "LP");
            var nbr3     = db.Candidats.Count(p => p.diplome == "LF");
            var nbr4     = db.Candidats.Count(p => p.diplome == "LST");

            string[] xv      = { "DUT", "DUG", "Licence Prof", "Licence Fond", "Licence Science et T" };
            int[]    yv      = { nbr, nbr1, nbr2, nbr3, nbr4 };
            var      Mychart = new Chart(width: 600, height: 400, theme: ChartTheme.Vanilla3D)
                               .AddSeries("Default", chartType: "pie",
                                          xValue: xv,
                                          yValues: yv)
                               .Write("png");

            return(null);
        }