Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/01/13 15:05:12 (12 years ago)
Author:
abeham
Message:

#2008: fixed remaining issues (view is readonly, matrix is not sortable, categorical values are displayed in the cells)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs

    r9236 r9267  
    724724    private void getDataAsMatrixToolStripMenuItem_Click(object sender, EventArgs e) {
    725725      int xCol = Matrix.ColumnNames.ToList().IndexOf(xAxisValue);
     726      int yCol = Matrix.ColumnNames.ToList().IndexOf(yAxisValue);
     727
    726728      var grouped = new Dictionary<string, List<string>>();
    727729      Dictionary<double, string> reverseMapping = null;
     
    730732      foreach (var run in Content.Where(r => r.Visible)) {
    731733        var x = GetValue(run, xAxisValue);
    732         var y = GetValue(run, yAxisValue);
    733         if (!(x.HasValue && y.HasValue)) continue;
     734        object y;
     735        if (categoricalMapping.ContainsKey(yCol))
     736          y = Content.GetValue(run, yAxisValue);
     737        else y = GetValue(run, yAxisValue);
     738        if (!(x.HasValue && y != null)) continue;
    734739
    735740        var category = reverseMapping == null ? x.Value.ToString() : reverseMapping[x.Value];
    736741        if (!grouped.ContainsKey(category)) grouped[category] = new List<string>();
    737         grouped[category].Add(y.Value.ToString());
     742        grouped[category].Add(y.ToString());
    738743      }
    739744
     
    749754        i++;
    750755      }
    751 
    752       MainFormManager.MainForm.ShowContent(matrix);
     756      matrix.SortableView = false;
     757      var view = MainFormManager.MainForm.ShowContent(matrix);
     758      view.ReadOnly = true;
    753759    }
    754760    #endregion
Note: See TracChangeset for help on using the changeset viewer.