Changeset 13144


Ignore:
Timestamp:
11/13/15 16:39:56 (4 years ago)
Author:
mkommend
Message:

#2436: Merged r12787 into stable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs

    r12725 r13144  
    345345      switch (axisDimension) {
    346346        case AxisDimension.Color: {
    347             value = GetCategoricalValue(-1, run.Color.ToString());
     347            const int colorDimension = -1;
     348            if (!categoricalMapping.ContainsKey(colorDimension)) {
     349              categoricalMapping[colorDimension] = Content.Where(r => r.Visible)
     350                  .Select(r => r.Color.Name)
     351                  .Distinct()
     352                  .OrderBy(c => c, new NaturalStringComparer())
     353                  .Select((c, i) => new { Color = c, Index = i })
     354                  .ToDictionary(a => (object)a.Color, a => (double)a.Index);
     355
     356            }
     357            value = GetCategoricalValue(colorDimension, run.Color.Name);
    348358            break;
    349359          }
Note: See TracChangeset for help on using the changeset viewer.