Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/18/13 17:24:29 (11 years ago)
Author:
pfleck
Message:

#2063:
Added time selection for charts.
Implemented redrawing of charts using Ajax.

File:
1 edited

Legend:

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

    r9628 r9643  
    8484
    8585      return from ci in db.FactClientInfos
    86              where ci.DimTime.Time > start && ci.DimTime.Time < end
    87              group ci by ci.DimTime.Time into timeGroup
     86             where ci.Time > start && ci.Time < end
     87             group ci by ci.Time into timeGroup
    8888             orderby timeGroup.Key
    8989             select timeGroup;
     
    9393      return selectors.Select(selector =>
    9494        data.Select(x => new[] {
    95           timeSelector(x).ToString("yyyy-MM-dd HH:mm"),
     95          //timeSelector(x).ToString("yyyy-MM-dd HH:mm"),
     96          timeSelector(x).ToUnixTimestamp(),
    9697          selector(x)
    9798        })
     
    99100    }
    100101  }
     102
     103  public static class DateTimeExtensions {
     104    public static long ToUnixTimestamp(this DateTime d) {
     105      var duration = d - new DateTime(1970, 1, 1, 0, 0, 0);
     106
     107      return (long)duration.TotalMilliseconds;
     108    }
     109  }
    101110}
Note: See TracChangeset for help on using the changeset viewer.