Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9662 for branches


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.

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  
    5353                },
    5454                yaxis: {
     55                    @if (axisYFormat != null) {<text>
    5556                    tickOptions: {
    56                         @if (axisYFormat != null) {
    57                             @:formatString: "@axisYFormat",
    58                         }
     57                        formatString: "@axisYFormat",
    5958                    },
     59                    </text>}
     60                    autoscale: true,
     61                    pad: 0,
    6062                    @if (minY != null) {
    6163                        @:min: @minY,
     
    6466                        @:max: @maxY,
    6567                    }
    66                     pad: 0,
    67                     autoscale: true
    6868                },
    6969            },
  • 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;
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/Views/Home/Index.cshtml

    r9646 r9662  
    4545            <li>End</li>
    4646            <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" })
    4848            </li>
    4949        </ol>
Note: See TracChangeset for help on using the changeset viewer.