Index: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml	(revision 9625)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml	(revision 9625)
@@ -0,0 +1,64 @@
+﻿@helper AjaxDataRenderer() {
+    <script>
+        var ajaxDataRenderer = function (url, plot, options) {
+            var ret = null;
+            $.ajax({
+                async: false,
+                url: url,
+                dataType: "json",
+                success: function (data) {
+                    ret = data;
+                }
+            });
+            return ret;
+        };
+    </script>
+}
+
+@helper LineChartTime(string destinationTag, string url, string title = "",
+    double? minY = null, double? maxY = null, string axisYFormat = null) {
+        
+    <script>
+        var @(destinationTag)Plot = $.jqplot("@destinationTag", "@url", {
+            title: "@title",
+            highlighter: {
+                show: true,
+                sizeAdjust: 7.5
+            },
+            dataRenderer: ajaxDataRenderer,
+            dataRendererOptions: {
+                unusedOptionalUrl: "@url"
+            },
+            axes: {
+                xaxis: {
+                    renderer: $.jqplot.DateAxisRenderer,
+                },
+                yaxis: {
+                    tickOptions: {
+                        @if (axisYFormat != null) { 
+                            @:formatString: "@axisYFormat",
+                        }
+                    },
+                    @if (minY != null) {
+                        @:min: @minY,
+                    }
+                    @if (maxY != null) {
+                        @:max: @maxY,
+                    }
+                    pad: 0,
+                    autoscale: true
+                },
+            },
+            cursor: {
+                show: true,
+                tooltipLocation:'sw'
+            }
+        });
+        
+        @(destinationTag)Plot.replot( {resetAxes:true} );
+        
+        $(window).resize(function() {
+            @(destinationTag)Plot.replot( {resetAxes:true} );
+        });
+    </script>
+}
Index: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Start/BundleConfig.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Start/BundleConfig.cs	(revision 9617)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Start/BundleConfig.cs	(revision 9625)
@@ -23,5 +23,5 @@
 
 namespace HeuristicLab.Services.Hive.Statistics {
-  public class BundleConfig {
+  public static class BundleConfig {
     public static void RegisterBundles(BundleCollection bundles) {
       bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
@@ -56,5 +56,8 @@
 
       bundles.Add(new ScriptBundle("~/Scripts/jqPlot/jquery.jqplot").Include(
-                  "~/Scripts/jqPlot/jquery.jqplot.js"));
+                  "~/Scripts/jqPlot/jquery.jqplot.js",
+                  "~/Scripts/jqPlot/plugins/jqplot.highlighter.js",
+                  "~/Scripts/jqPlot/plugins/jqplot.dateAxisRenderer.js",
+                  "~/Scripts/jqPlot/plugins/jqplot.cursor.js"));
 
       bundles.Add(new StyleBundle("~/Styles/jqPlot/jquery.jqplot").Include(
Index: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Start/FilterConfig.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Start/FilterConfig.cs	(revision 9617)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Start/FilterConfig.cs	(revision 9625)
@@ -23,5 +23,5 @@
 
 namespace HeuristicLab.Services.Hive.Statistics {
-  public class FilterConfig {
+  public static class FilterConfig {
     public static void RegisterGlobalFilters(GlobalFilterCollection filters) {
       filters.Add(new HandleErrorAttribute());
Index: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Start/RouteConfig.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Start/RouteConfig.cs	(revision 9617)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Start/RouteConfig.cs	(revision 9625)
@@ -24,5 +24,5 @@
 
 namespace HeuristicLab.Services.Hive.Statistics {
-  public class RouteConfig {
+  public static class RouteConfig {
     public static void RegisterRoutes(RouteCollection routes) {
       routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
Index: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Content/Site.css
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Content/Site.css	(revision 9617)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Content/Site.css	(revision 9625)
@@ -184,2 +184,14 @@
   border: 1px solid #CCC;
 }
+
+.charts {
+  font-size: 1.5em;
+}
+
+.charts > div {
+  height: 300px;
+  margin-top: 15px;
+  margin-bottom: 5px;
+  margin-left: 10px;
+  margin-right: 20px;
+}
Index: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ChartDataController.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ChartDataController.cs	(revision 9625)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ChartDataController.cs	(revision 9625)
@@ -0,0 +1,99 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web.Mvc;
+using HeuristicLab.Services.Hive.DataAccess;
+
+namespace HeuristicLab.Services.Hive.Statistics.Controllers {
+  public class ChartDataController : Controller {
+    private static readonly TimeSpan DefaultDuration = new TimeSpan(1, 0, 0, 0);
+
+    public JsonResult AverageCpuUtilization(DateTime? start = null, DateTime? end = null) {
+      using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) {
+        var data =
+          from facts in GetClientFacts(db, start, end)
+          select new {
+            Time = facts.Key,
+            CpuUtilization = facts.Average(x => x.CpuUtilization)
+          };
+
+        return Json(
+          CreateSeriesData(data.ToList(), x => x.Time, x => x.CpuUtilization),
+          JsonRequestBehavior.AllowGet);
+      }
+    }
+
+    public JsonResult UsedCores(DateTime? start = null, DateTime? end = null) {
+      using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) {
+        var data =
+          from facts in GetClientFacts(db, start, end)
+          select new {
+            Time = facts.Key,
+            UsedCores = facts.Sum(x => x.NumUsedCores),
+            TotalCores = facts.Sum(x => x.NumTotalCores)
+          };
+
+        return Json(
+          CreateSeriesData(data.ToList(), x => x.Time, x => x.UsedCores, x => x.TotalCores),
+          JsonRequestBehavior.AllowGet);
+      }
+    }
+
+    public JsonResult UsedMemory(DateTime? start = null, DateTime? end = null) {
+      using (var db = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString)) {
+        var data =
+          from facts in GetClientFacts(db, start, end)
+          select new {
+            Time = facts.Key,
+            UsedMemory = facts.Sum(x => x.UsedMemory),
+            TotalMemory = facts.Sum(x => x.TotalMemory)
+          };
+
+        return Json(
+          CreateSeriesData(data.ToList(), x => x.Time, x => x.UsedMemory, x => x.TotalMemory),
+          JsonRequestBehavior.AllowGet);
+      }
+    }
+
+    private static IOrderedQueryable<IGrouping<DateTime, FactClientInfo>> GetClientFacts(HiveDataContext db, DateTime? start = null, DateTime? end = null) {
+      start = start ?? DateTime.Now - DefaultDuration;
+      end = end ?? DateTime.Now;
+
+      return from ci in db.FactClientInfos
+             where ci.DimTime.Time > start && ci.DimTime.Time < end
+             group ci by ci.DimTime.Time into timeGroup
+             orderby timeGroup.Key
+             select timeGroup;
+    }
+
+    private static IEnumerable<IEnumerable<object[]>> CreateSeriesData<T>(IEnumerable<T> data, Func<T, DateTime> timeSelector, params Func<T, object>[] selectors) {
+      return selectors.Select(selector =>
+        data.Select(x => new[] {
+          timeSelector(x).ToString("yyyy-MM-dd HH:mm"),
+          selector(x)
+        })
+      );
+    }
+  }
+}
Index: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/HomeController.cs
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/HomeController.cs	(revision 9617)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/HomeController.cs	(revision 9625)
@@ -21,7 +21,5 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
-using System.Web.Helpers;
 using System.Web.Mvc;
 using HeuristicLab.Services.Hive.DataAccess;
@@ -71,28 +69,4 @@
       throw new Exception();
     }
-
-    public ActionResult Test() {
-      var data = new Dictionary<string, float>
-        {
-            {"test", 10.023f},
-            {"test2", 20.020f},
-            {"test3", 19.203f},
-            {"test4", 4.039f},
-            {"test5", 5.343f}
-    };
-
-      var chart = new Chart(600, 400)
-        .AddTitle("Testchart")
-        .AddSeries(
-          name: "13456",
-          chartType: "Area",
-          xValue: new[] { 1, 2, 3, 4, 5 },
-          yValues: new[] { 10, 20, 35, 70, 50 }
-        );
-
-      chart.Write("png");
-
-      return null;
-    }
   }
 }
Index: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/HeuristicLab.Services.Hive.Statistics-3.3.csproj
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/HeuristicLab.Services.Hive.Statistics-3.3.csproj	(revision 9617)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/HeuristicLab.Services.Hive.Statistics-3.3.csproj	(revision 9625)
@@ -108,5 +108,7 @@
     <Compile Include="App_Start\RouteConfig.cs" />
     <Compile Include="Controllers\AccountController.cs" />
+    <Compile Include="Controllers\ChartDataController.cs" />
     <Compile Include="Controllers\HomeController.cs" />
+    <Compile Include="Helper\HtmlChartHelper.cs" />
     <Compile Include="Models\OverallStatistics.cs" />
     <Compile Include="Global.asax.cs">
@@ -116,4 +118,5 @@
     <Compile Include="Models\AccountModels.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Content Include="App_Code\ChartHelper.cshtml" />
     <None Include="Properties\AssemblyInfo.cs.frame" />
   </ItemGroup>
Index: branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home/Index.cshtml
===================================================================
--- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home/Index.cshtml	(revision 9617)
+++ branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home/Index.cshtml	(revision 9625)
@@ -18,10 +18,10 @@
         </tr>
         <tr>
+            <td>Used Cores</td>
+            <td>@Model.CurrentlyUsedCores</td>
+        </tr>
+        <tr>
             <td>System-Wide Waiting Tasks</td>
             <td>@Model.CurrentlyJobsWaiting</td>
-        </tr>
-        <tr>
-            <td>Used Cores</td>
-            <td>@Model.CurrentlyUsedCores</td>
         </tr>
         <tr>
@@ -36,16 +36,35 @@
 </section>
 
-<section>
-    <div id="chartdiv" style="height:400px;width:300px;"></div>
+<section class="charts">
+    <div id="AverageCpuUtilization"></div>
+    <div id="UsedCores"></div>
+    <div id="UsedMemory"></div>
 </section>
 
 @section Styles {
-    @Styles.Render("~/Scripts/jqPlot/jquery.jqplot")
+    @Styles.Render("~/Styles/jqPlot/jquery.jqplot")
 }
 
 @section Scripts {
     @Scripts.Render("~/Scripts/jqPlot/jquery.jqplot")
-    <script>
-        $.jqplot('chartdiv', [[[1, 2], [3, 5.12], [5, 13.1], [7, 33.6], [9, 85.9], [11, 219.9]]]);
-    </script>
+    @ChartHelper.AjaxDataRenderer()
+
+    @ChartHelper.LineChartTime(
+        "AverageCpuUtilization",
+        Url.Action("AverageCpuUtilization", "ChartData"),
+        title: "Avg. CPU Utilization History of all Slaves",
+        axisYFormat: "%.2f%%",
+        minY: 0, maxY: 100)
+
+    @ChartHelper.LineChartTime(
+        "UsedCores",
+        Url.Action("UsedCores", "ChartData"),
+        title: "Cores / Used Cores",
+        minY: 0)
+
+    @ChartHelper.LineChartTime(
+        "UsedMemory",
+        Url.Action("UsedMemory", "ChartData"),
+        title: "Memory / Used Memory",
+        minY: 0)
 }
