Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/27/13 15:32:49 (11 years ago)
Author:
pfleck
Message:

#2063:
Rearranged axis options in jqplot charts.
Renamed selectors into seriesSelectors in CreateSeriesData.
Changed default date range on index page.

File:
1 edited

Legend:

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

    r9646 r9662  
    8484
    8585      return from ci in db.FactClientInfos
    86              where ci.Time > start && ci.Time < end
     86             where ci.Time >= start && ci.Time < end
    8787             group ci by ci.Time into timeGroup
    8888             orderby timeGroup.Key
     
    9090    }
    9191
    92     private static IEnumerable<IEnumerable<object[]>> CreateSeriesData<T>(IEnumerable<T> data, Func<T, DateTime> timeSelector, params Func<T, object>[] selectors) {
    93       return selectors.Select(selector =>
     92    private static IEnumerable<IEnumerable<object[]>> CreateSeriesData<T>(IEnumerable<T> data, Func<T, DateTime> timeSelector, params Func<T, object>[] seriesSelectors) {
     93      return seriesSelectors.Select(selector =>
    9494        data.Select(x => new[] {
    9595          timeSelector(x).ToUniversalTime().ToUnixTimestamp(),
     
    101101
    102102  public static class DateTimeExtensions {
    103     public static long ToUnixTimestamp(this DateTime d) {
    104       var duration = d - new DateTime(1970, 1, 1, 0, 0, 0);
     103    public static long ToUnixTimestamp(this DateTime dateTime) {
     104      var duration = dateTime - new DateTime(1970, 1, 1, 0, 0, 0);
    105105
    106106      return (long)duration.TotalMilliseconds;
Note: See TracChangeset for help on using the changeset viewer.