Changeset 9662 for branches/HiveStatistics
- Timestamp:
- 06/27/13 15:32:49 (11 years ago)
- Location:
- branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml
r9646 r9662 53 53 }, 54 54 yaxis: { 55 @if (axisYFormat != null) {<text> 55 56 tickOptions: { 56 @if (axisYFormat != null) { 57 @:formatString: "@axisYFormat", 58 } 57 formatString: "@axisYFormat", 59 58 }, 59 </text>} 60 autoscale: true, 61 pad: 0, 60 62 @if (minY != null) { 61 63 @:min: @minY, … … 64 66 @:max: @maxY, 65 67 } 66 pad: 0,67 autoscale: true68 68 }, 69 69 }, -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Controllers/ChartDataController.cs
r9646 r9662 84 84 85 85 return from ci in db.FactClientInfos 86 where ci.Time > start && ci.Time < end86 where ci.Time >= start && ci.Time < end 87 87 group ci by ci.Time into timeGroup 88 88 orderby timeGroup.Key … … 90 90 } 91 91 92 private static IEnumerable<IEnumerable<object[]>> CreateSeriesData<T>(IEnumerable<T> data, Func<T, DateTime> timeSelector, params Func<T, object>[] se lectors) {93 return se lectors.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 => 94 94 data.Select(x => new[] { 95 95 timeSelector(x).ToUniversalTime().ToUnixTimestamp(), … … 101 101 102 102 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); 105 105 106 106 return (long)duration.TotalMilliseconds; -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home/Index.cshtml
r9646 r9662 45 45 <li>End</li> 46 46 <li> 47 @Html.TextBox("End", DateTime.Now.ToString("yyyy-MM-dd"), new { @class = "date" })47 @Html.TextBox("End", (DateTime.Now + new TimeSpan(1, 0, 0, 0)).ToString("yyyy-MM-dd"), new { @class = "date" }) 48 48 </li> 49 49 </ol>
Note: See TracChangeset
for help on using the changeset viewer.