Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/02/12 11:40:31 (12 years ago)
Author:
sforsten
Message:

#1708: merged r7209 from trunk

  • adjusted GUI
  • added toggle for the different series
  • X Axis labels are rounded to useful values
  • added ToolTip
Location:
branches/RegressionBenchmarks
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/RegressionBenchmarks

  • branches/RegressionBenchmarks/HeuristicLab.Clients.Hive.Views/3.3/StateLog/StateLogGanttChartListView.cs

    r6976 r7255  
    5656      base.OnContentChanged();
    5757      if (Content == null) {
    58         // Add code when content has been changed and is null
    5958        ganttChart.Reset();
    6059      } else {
    61         // Add code when content has been changed and is not null
    6260        ganttChart.Reset();
    6361        SetupCategories(ganttChart);
    6462        if (Content.Count > 0) {
    6563          DateTime maxValue = Content.Max(x => x.Count > 0 ? x.Max(y => y.DateTime) : DateTime.MinValue);
     64          DateTime minValue = Content.Min(x => x.Count > 0 ? x.Min(y => y.DateTime) : DateTime.MinValue);
    6665          DateTime upperLimit;
    6766          if (Content.All(x => x.Count > 0 ? (x.Last().State == TaskState.Finished || x.Last().State == TaskState.Failed || x.Last().State == TaskState.Aborted) : true)) {
     
    6968          } else {
    7069            upperLimit = DateTime.Now;
     70          }
     71
     72          if ((upperLimit - minValue) > TimeSpan.FromDays(1)) {
     73            this.ganttChart.chart.Series[0].YValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Date;
     74          } else {
     75            this.ganttChart.chart.Series[0].YValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Time;
    7176          }
    7277
     
    98103      DateTime until = to != null ? to.DateTime : upperLimit;
    99104      TimeSpan duration = until - from.DateTime;
    100       string tooltip = string.Format("State: {0} " + Environment.NewLine + " Duration: {1} " + Environment.NewLine + " {2} - {3}", from.State, duration, from.DateTime, until);
     105      string tooltip = string.Format("Task: {0} " + Environment.NewLine + "Task Id: {1}" + Environment.NewLine + "State: {2} " + Environment.NewLine + "Duration: {3} " + Environment.NewLine + "{4} - {5}", from.TaskName, from.TaskId, from.State, duration, from.DateTime, until);
    101106      if (!string.IsNullOrEmpty(from.Exception))
    102107        tooltip += Environment.NewLine + from.Exception;
Note: See TracChangeset for help on using the changeset viewer.