Index: /branches/BubbleChart/HeuristicLab.Optimization.BubbleChart/3.3/BubbleChartView.cs
===================================================================
--- /branches/BubbleChart/HeuristicLab.Optimization.BubbleChart/3.3/BubbleChartView.cs	(revision 12879)
+++ /branches/BubbleChart/HeuristicLab.Optimization.BubbleChart/3.3/BubbleChartView.cs	(revision 12880)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
@@ -33,5 +34,5 @@
 namespace HeuristicLab.Optimization.BubbleChart {
   [View("Bubble Chart (Recursive)")]
-  [Content(typeof(RecursiveDataItem), false)]
+  [Content(typeof(RecursiveDataItem), true)]
   public partial class BubbleChartView : ItemView {
     private const string Separator = ":";
@@ -86,14 +87,10 @@
     }
     private IEnumerable<string> GetAvailableKeys() {
-      var collector = new HashSet<string>();
+      var collector = new List<string>();
       GetAvailableKeys(Content, collector);
-      return collector;
-    }
-    private void GetAvailableKeys(RecursiveDataItem node, ISet<string> collector) {
-      foreach (var child in node.Children) {
-        foreach (var key in child.Data.Keys) {
-          collector.Add(node.Name + Separator + key);
-        }
-      }
+      return collector.Distinct();
+    }
+    private void GetAvailableKeys(RecursiveDataItem node, List<string> collector) {
+      collector.AddRange(node.Data.Keys);
 
       foreach (var child in node.Children)
@@ -153,7 +150,7 @@
         var additionalSizeDimension = Enum.GetNames(typeof(SizeDimension));
 
-        xAxisComboBox.Items.AddRange(additionalAxisDimension);
+        //xAxisComboBox.Items.AddRange(additionalAxisDimension);
         xAxisComboBox.Items.AddRange(axisNames);
-        yAxisComboBox.Items.AddRange(additionalAxisDimension);
+        //yAxisComboBox.Items.AddRange(additionalAxisDimension);
         yAxisComboBox.Items.AddRange(axisNames);
         sizeComboBox.Items.AddRange(additionalSizeDimension);
@@ -190,107 +187,55 @@
       chart.ChartAreas[0].AxisY.IsMarginVisible = !(YAxisValue != null && YAxisValue.Contains(AxisDimension.Index.ToString()));
 
-      if (Content != null) {
-        var items = GetAvailableItems().ToList();
-        var xss = GetValues(items, XAxisValue).Select(x => x.ToList()).ToList();
-        var yss = GetValues(items, YAxisValue).Select(x => x.ToList()).ToList();
-        var sss = GetValues(items, SizeAxisValue).Select(x => x.ToList()).ToList();
-
-        if (xss.Any(xs => xs.Any()) && yss.Any(ys => ys.Any()) && sss.Any(ss => ss.Any())) {
-          var xDim = Tuple.Create(xss.Count, xss.Max(xs => xs.Count));
-          var yDim = Tuple.Create(yss.Count, yss.Max(ys => ys.Count));
-          var sDim = Tuple.Create(sss.Count, sss.Max(ss => ss.Count));
-
-          var isSimple = new Func<Tuple<int, int>, bool>(dim => dim.Item1 == 1 && dim.Item2 > 1 || dim.Item1 > 1 && dim.Item2 == 1);
-          var flatten = new Func<List<List<double>>, List<double>>(ss => ss.SelectMany(s => s).ToList());
-
-          if (isSimple(xDim) && isSimple(yDim)) {
-            var xs = flatten(xss);
-            var ys = flatten(yss);
-            if (xs.Count == ys.Count) {
-              var xsEnum = xs.GetEnumerator();
-              var ysEnum = ys.GetEnumerator();
-              while (xsEnum.MoveNext() & ysEnum.MoveNext())
-                series.Points.Add(new DataPoint(xsEnum.Current, new[] { ysEnum.Current, sss[0][0] }));
-            } /*else {
-              foreach (var x in xs)
-                foreach (var y in ys)
-                  series.Points.Add(new DataPoint(x, new[] { y, sss[0][0] }));
-            }*/
-          } else if (isSimple(xDim)) {
-            var xs = flatten(xss);
-            if (xs.Count == yss.Count) {
-              var xsEnum = xs.GetEnumerator();
-              var yssEnum = yss.GetEnumerator();
-              while (xsEnum.MoveNext() & yssEnum.MoveNext()) {
-                var x = xsEnum.Current;
-                var ys = yssEnum.Current;
-                foreach (var y in ys)
-                  series.Points.Add(new DataPoint(x, new[] { y, sss[0][0] }));
-              }
-            }
-          } else if (isSimple(yDim)) {
-            var ys = flatten(yss);
-            if (xss.Count == ys.Count) {
-              var xssEnum = xss.GetEnumerator();
-              var ysEnum = ys.GetEnumerator();
-              while (xssEnum.MoveNext() & ysEnum.MoveNext()) {
-                var xs = xssEnum.Current;
-                var y = ysEnum.Current;
-                foreach (var x in xs)
-                  series.Points.Add(new DataPoint(x, new[] { y, sss[0][0] }));
-              }
-            }
-          } else {
-            if (xss.Count == yss.Count) {
-              var xssEnum = xss.GetEnumerator();
-              var yssEnum = yss.GetEnumerator();
-              while (xssEnum.MoveNext() & yssEnum.MoveNext()) {
-                var xs = xssEnum.Current;
-                var ys = yssEnum.Current;
-                if (xs.Count == ys.Count) {
-                  var xsEnum = xs.GetEnumerator();
-                  var ysEnum = ys.GetEnumerator();
-                  while (xsEnum.MoveNext() & ysEnum.MoveNext())
-                    series.Points.Add(new DataPoint(xsEnum.Current, new[] { ysEnum.Current, sss[0][0] }));
-                }
-              }
-            } else if (xDim.Item2 == yDim.Item2) {
-              foreach (var xs in xss) {
-                foreach (var ys in yss) {
-                  var xsEnum = xs.GetEnumerator();
-                  var ysEnum = ys.GetEnumerator();
-                  while (xsEnum.MoveNext() & ysEnum.MoveNext()) {
-                    series.Points.Add(new DataPoint(xsEnum.Current, new[] { ysEnum.Current, sss[0][0] }));
-                  }
-                }
-              }
-            }
-          }
-        }
-        UpdateMarkerSizes();
-      }
-    }
-
-    /*var items = GetAvailableItems();
-          foreach (var item in items) {
-            var xs = GetValues(item, XAxisValue).ToList();
-            var ys = GetValues(item, YAxisValue).ToList();
-            var ss = GetValues(item, SizeAxisValue).ToList();
-            if (xs.Count > 0 && ys.Count > 0 && (ss.Count == 1 || ss.Count == xs.Count || ss.Count == ys.Count)) {
-              var sEnum = ss.Count > 1 ? ss.GetEnumerator() : Enumerable.Repeat(ss[0], xs.Count * ys.Count).GetEnumerator();
-              sEnum.MoveNext();
-              if (xs.Count > 1 && ys.Count > 1) { // index matching
-                for (int i = 0; i < Math.Min(xs.Count, ys.Count); i++)
-                  series.Points.Add(new DataPoint(xs[i], new[] { ys[i], sEnum.Current }));
-              } else {
-                foreach (var x in xs) {
-                  foreach (var y in ys) {
-                    series.Points.Add(new DataPoint(x, new[] { y, sEnum.Current }));
-                    sEnum.MoveNext();
-                  }
-                }
-              }
-            }
-          }*/
+      if (Content == null || string.IsNullOrEmpty(XAxisValue) || string.IsNullOrEmpty(YAxisValue)) return;
+
+      var xss = GetValues(XAxisValue);
+      var yss = GetValues(YAxisValue);
+
+      if (xss.Count == yss.Count) {
+        for (int i = 0; i < xss.Count; i++)
+          AddPoints(xss[i], yss[i], series);
+      } else if (xss.Count == 1 || yss.Count == 1) {
+        for (int i = 0; i < xss.Count; i++)
+          for (int j = 0; j < yss.Count; j++)
+            AddPoints(xss[i], yss[j], series);
+      }
+    }
+    void AddPoints(double[] xs, double[] ys, Series series) {
+      if (xs.Length != ys.Length) return;
+      for (int k = 0; k < xs.Length; k++) {
+        series.Points.Add(new DataPoint(xs[k], new[] { ys[k], 1.0 }));
+      }
+    }
+
+    private List<double[]> GetValues(string key) {
+      var collector = new List<double[]>();
+      GetValues(Content, key, collector);
+      return collector;
+    }
+    private void GetValues(RecursiveDataItem node, string key, List<double[]> collector) {
+      IItem item;
+      if (node.Data.TryGetValue(key, out item)) {
+        var value = ConvertToDoubles(node, key);
+        collector.Add(value);
+      }
+
+      foreach (var child in node.Children)
+        GetValues(child, key, collector);
+    }
+
+    private double[] ConvertToDoubles(RecursiveDataItem item, string key) {
+      IItem value = item.Data[key];
+      var doubleValue = value as DoubleValue;
+      var doubleArray = value as DoubleArray;
+      var intValue = value as IntValue;
+      var intArray = value as IntArray;
+      var timeSpanValue = value as TimeSpanValue;
+      if (doubleValue != null) return new double[1] { doubleValue.Value };
+      if (intValue != null) return new double[1] { intValue.Value };
+      if (timeSpanValue != null) return new double[1] { timeSpanValue.Value.TotalSeconds };
+      if (doubleArray != null) return doubleArray.ToArray();
+      if (intArray != null) return intArray.Select(v => (double)v).ToArray();
+      return new double[1] { GetCategoricalValue(key, value.ToString()).Value };
+    }
 
     private IEnumerable<IEnumerable<double>> GetValues(IEnumerable<RecursiveDataItem> items, string key) {
Index: /branches/BubbleChart/HeuristicLab.Optimization.BubbleChart/3.3/RecursiveDataItemView.cs
===================================================================
--- /branches/BubbleChart/HeuristicLab.Optimization.BubbleChart/3.3/RecursiveDataItemView.cs	(revision 12879)
+++ /branches/BubbleChart/HeuristicLab.Optimization.BubbleChart/3.3/RecursiveDataItemView.cs	(revision 12880)
@@ -28,5 +28,5 @@
 namespace HeuristicLab.Optimization.BubbleChart {
   [View("RecursiveDataItem View")]
-  [Content(typeof(RecursiveDataItem), true)]
+  [Content(typeof(RecursiveDataItem), false)]
   public partial class RecursiveDataItemView : NamedItemView {
 
