Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/13/13 17:50:00 (11 years ago)
Author:
pfleck
Message:

#2063:
Insert charts on index page for CPU utilization, cores and memory usage.
Added html helper for generating chart javascript.
Added ChartDataController for generating JSON data for the charts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/HomeController.cs

    r9617 r9625  
    2121
    2222using System;
    23 using System.Collections.Generic;
    2423using System.Linq;
    25 using System.Web.Helpers;
    2624using System.Web.Mvc;
    2725using HeuristicLab.Services.Hive.DataAccess;
     
    7169      throw new Exception();
    7270    }
    73 
    74     public ActionResult Test() {
    75       var data = new Dictionary<string, float>
    76         {
    77             {"test", 10.023f},
    78             {"test2", 20.020f},
    79             {"test3", 19.203f},
    80             {"test4", 4.039f},
    81             {"test5", 5.343f}
    82     };
    83 
    84       var chart = new Chart(600, 400)
    85         .AddTitle("Testchart")
    86         .AddSeries(
    87           name: "13456",
    88           chartType: "Area",
    89           xValue: new[] { 1, 2, 3, 4, 5 },
    90           yValues: new[] { 10, 20, 35, 70, 50 }
    91         );
    92 
    93       chart.Write("png");
    94 
    95       return null;
    96     }
    9771  }
    9872}
Note: See TracChangeset for help on using the changeset viewer.