Ejemplo n.º 1
0
        private ActionResult DateLineChartWithAverage(string title, string pointsTitle, string yAxisTitle, ICollection <Tuple <DateTime, int> > points,
                                                      bool average = true)
        {
            Response.Cache.SetCacheability(HttpCacheability.Public);
            Response.Cache.SetMaxAge(TimeSpan.FromDays(1));
            Response.Cache.SetSlidingExpiration(true);

            return(LowercaseJson(HighchartsHelper.DateLineChartWithAverage(title, pointsTitle, yAxisTitle, points, average)));
        }
Ejemplo n.º 2
0
        private ActionResult DateLineChartWithAverage(string title, string pointsTitle, string yAxisTitle, ICollection <Tuple <DateTime, int> > points,
                                                      bool average = true)
        {
            Response.GetTypedHeaders().CacheControl = new CacheControlHeaderValue
            {
                Public = true,
                MaxAge = TimeSpan.FromDays(1),
            };
            // TODO: implement Response.Cache.SetSlidingExpiration(true);

            return(LowercaseJson(HighchartsHelper.DateLineChartWithAverage(title, pointsTitle, yAxisTitle, points, average)));
        }
Ejemplo n.º 3
0
        public ActionResult Stats_EditsPerDay(int id)
        {
            var points = new ActivityEntryQueries(repository).GetEditsPerDay(id, null);

            return(LowercaseJson(HighchartsHelper.DateLineChartWithAverage("Edits per day", "Edits", "Number of edits", points)));
        }