Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs	(revision 9232)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs	(revision 9235)
@@ -124,4 +124,5 @@
         this.categoricalMapping.Clear();
         UpdateDataPoints();
+        UpdateAxisLabels();
       }
     }
@@ -326,11 +327,14 @@
     }
     private double GetCategoricalValue(int dimension, string value) {
-      if (!this.categoricalMapping.ContainsKey(dimension))
+      if (!this.categoricalMapping.ContainsKey(dimension)) {
         this.categoricalMapping[dimension] = new Dictionary<object, double>();
-      if (!this.categoricalMapping[dimension].ContainsKey(value)) {
-        if (this.categoricalMapping[dimension].Values.Count == 0)
-          this.categoricalMapping[dimension][value] = 1.0;
-        else
-          this.categoricalMapping[dimension][value] = this.categoricalMapping[dimension].Values.Max() + 1.0;
+        var orderedCategories = Content.Select(r => Content.GetValue(r, dimension).ToString())
+                                .Distinct()
+                                .OrderBy(x => x, new NaturalStringComparer());
+        int count = 1;
+        foreach (var category in orderedCategories) {
+          this.categoricalMapping[dimension].Add(category, count);
+          count++;
+        }
       }
       return this.categoricalMapping[dimension][value];
Index: trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs	(revision 9232)
+++ trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs	(revision 9235)
@@ -44,4 +44,5 @@
 
     private Dictionary<IRun, List<DataPoint>> runToDataPointMapping;
+    private Dictionary<IRun, int> runToIndexMapping;
     private Dictionary<int, Dictionary<object, double>> categoricalMapping;
     private Dictionary<IRun, double> xJitter;
@@ -52,4 +53,6 @@
     private bool isSelecting = false;
     private bool suppressUpdates = false;
+
+
 
     public RunCollectionBubbleChartView() {
@@ -167,5 +170,18 @@
       UpdateDataPoints();
       UpdateCaption();
-    }
+      RebuildInverseIndex();
+    }
+
+    private void RebuildInverseIndex() {
+      if (Content != null) {
+        runToIndexMapping = new Dictionary<IRun, int>(Content.Count);
+        int i = 0;
+        foreach (var run in Content) {
+          runToIndexMapping.Add(run, i);
+          i++;
+        }
+      }
+    }
+
     private void Content_ColumnNamesChanged(object sender, EventArgs e) {
       if (InvokeRequired)
@@ -210,6 +226,8 @@
           changed = true;
         }
-        if (changed)
+        if (changed) {
           UpdateDataPoints();
+          UpdateAxisLabels();
+        }
       }
     }
@@ -236,5 +254,7 @@
       else {
         this.categoricalMapping.Clear();
+        RebuildInverseIndex();
         UpdateDataPoints();
+        UpdateAxisLabels();
       }
     }
@@ -399,19 +419,23 @@
     }
     private double GetCategoricalValue(int dimension, string value) {
-      if (!this.categoricalMapping.ContainsKey(dimension))
+      if (!this.categoricalMapping.ContainsKey(dimension)) {
         this.categoricalMapping[dimension] = new Dictionary<object, double>();
-      if (!this.categoricalMapping[dimension].ContainsKey(value)) {
-        if (this.categoricalMapping[dimension].Values.Count == 0)
-          this.categoricalMapping[dimension][value] = 1.0;
-        else
-          this.categoricalMapping[dimension][value] = this.categoricalMapping[dimension].Values.Max() + 1.0;
+        var orderedCategories = Content.Select(r => Content.GetValue(r, dimension).ToString())
+                                    .Distinct()
+                                    .OrderBy(x => x, new NaturalStringComparer());
+        int count = 1;
+        foreach (var category in orderedCategories) {
+          this.categoricalMapping[dimension].Add(category, count);
+          count++;
+        }
       }
       return this.categoricalMapping[dimension][value];
     }
+
     private double GetValue(IRun run, AxisDimension axisDimension) {
       double value = double.NaN;
       switch (axisDimension) {
         case AxisDimension.Index: {
-            value = Content.ToList().IndexOf(run);
+            value = runToIndexMapping[run];
             break;
           }
@@ -740,13 +764,18 @@
 
     private void ColorRuns(string axisValue) {
-      var runs = Content.Where(r => r.Visible).Select(r => new { Run = r, Value = GetValue(r, axisValue) }).Where(r => r.Value.HasValue);
+      var runs = Content.Where(r => r.Visible).Select(r => new { Run = r, Value = GetValue(r, axisValue) }).Where(r => r.Value.HasValue).ToList();
       double minValue = runs.Min(r => r.Value.Value);
       double maxValue = runs.Max(r => r.Value.Value);
       double range = maxValue - minValue;
 
-      foreach (var r in runs) {
-        int colorIndex = 0;
-        if (!range.IsAlmost(0)) colorIndex = (int)((ColorGradient.Colors.Count - 1) * (r.Value.Value - minValue) / (range));
-        r.Run.Color = ColorGradient.Colors[colorIndex];
+      if (range.IsAlmost(0)) {
+        Color c = ColorGradient.Colors[0];
+        runs.ForEach(r => r.Run.Color = c);
+      } else {
+        int maxColorIndex = ColorGradient.Colors.Count - 1;
+        foreach (var r in runs) {
+          int colorIndex = (int)(maxColorIndex * (r.Value - minValue) / (range));
+          r.Run.Color = ColorGradient.Colors[colorIndex];
+        }
       }
     }
