public PartialViewResult DesignCities(string[] checkedValues, int min, int max, string designType, string filterType)
        {
            ViewBag.FilterType = 3;
            DesignCities design = new Charts.DesignCities();

            int[] all  = null;
            int[] good = null;
            if (filterType == "2")
            {
                design.Return_values_per_week(min, max, designType, checkedValues, out all, out good);
            }
            else
            {
                design.Return_values_per_month(min, max, designType, checkedValues, out all, out good);
            }
            ViewBag.Type           = 3;
            ViewBag.Titles         = checkedValues;
            ViewBag.GoodValuesWeek = good;
            ViewBag.AllValuesWeek  = all;
            ViewBag.MainTitle      = 9;
            return(PartialView("ChartDraw"));
        }
        public PartialViewResult DesignDraw(string ChartType, string designType, string filterType, int weekMin, int weekMax, int monthMin, int monthMax)
        {
            ViewBag.FilterType = filterType;
            int[]    ALLWeekvalues  = new int[52];
            int[]    GoodWeekvalues = new int[52];
            string[] titles         = null;

            string[] titlesMonth = new string[monthMax - monthMin + 1];
            for (int i = 0; i < titlesMonth.Length; i++)
            {
                titlesMonth[i] = (i + monthMin - 1).ToString();
            }
            if (ChartType == "1")
            {
                DesignChart design = new DesignChart();
                int         ty     = 0;
                if (filterType == "1")
                {
                    design.Return_values_per_month(monthMin, monthMax, designType, out ALLWeekvalues, out GoodWeekvalues);
                    titles = titlesMonth;
                    ty     = 2;
                }

                else
                {
                    design.Return_values_per_week(weekMin, weekMax, designType, out ALLWeekvalues, out GoodWeekvalues);
                    titles = new string[weekMax - weekMin + 1];
                    for (int i = 0; i < weekMax - weekMin + 1; i++)
                    {
                        titles[i] = "W" + (weekMin + i).ToString();
                    }
                    ty = 1;
                }

                ViewBag.GoodValuesWeek = GoodWeekvalues;
                ViewBag.AllValuesWeek  = ALLWeekvalues;
                ViewBag.Titles         = titles;
                ViewBag.type           = ty;
                ViewBag.MainTitle      = 9;
                return(PartialView("ChartDraw"));
            }
            else
            {
                DesignCities         chartDesign = new Charts.DesignCities();
                IEnumerable <string> cities      = null;
                if (filterType == "2")
                {
                    cities             = chartDesign.returnCitiesWeek(ChartType, weekMin, weekMax);
                    ViewBag.min        = weekMin;
                    ViewBag.max        = weekMax;
                    ViewBag.filterType = 2;///
                    //ViewBag.type = 1;
                }
                else
                {
                    cities             = chartDesign.returnCitiesMonth(ChartType, monthMin, monthMax);
                    ViewBag.min        = monthMin;
                    ViewBag.max        = monthMax;
                    ViewBag.filterType = 1;
                }
                ViewBag.designType = designType;
                ViewBag.MainTitle  = 9;
                return(PartialView("DesignCities", cities));
            }
        }