Index: /trunk/sources/HeuristicLab.CEDMA.Charting/BubbleChart.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Charting/BubbleChart.cs	(revision 561)
+++ /trunk/sources/HeuristicLab.CEDMA.Charting/BubbleChart.cs	(revision 561)
@@ -0,0 +1,189 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Drawing;
+using System.Linq;
+using HeuristicLab.Charting;
+
+namespace HeuristicLab.CEDMA.Charting {
+  public class BubbleChart : Chart {
+    private const double maxXJitterPercent = 0.05;
+    private const double maxYJitterPercent = 0.05;
+    private const int minBubbleSize = 5;
+    private const int maxBubbleSize = 30;
+    private const int maxAlpha = 255;
+    private const int minAlpha = 50;
+    private static readonly Color defaultColor = Color.Blue;
+
+    private List<string> dimensions;
+    private Dictionary<string, List<double>> values;
+    private double xJitterFactor = 0.0;
+    private double yJitterFactor = 0.0;
+    private string xDimension;
+    private string yDimension;
+    private string sizeDimension;
+    private bool invertSize;
+    private double minX = double.PositiveInfinity;
+    private double minY = double.PositiveInfinity;
+    private double maxX = double.NegativeInfinity;
+    private double maxY = double.NegativeInfinity;
+
+    private Random random = new Random();
+
+    public BubbleChart(PointD lowerLeft, PointD upperRight)
+      : base(lowerLeft, upperRight) {
+      dimensions = new List<string>();
+      values = new Dictionary<string, List<double>>();
+    }
+    public BubbleChart(double x1, double y1, double x2, double y2)
+      : this(new PointD(x1, y1), new PointD(x2, y2)) {
+    }
+
+    public void AddDimension(string name) {
+      dimensions.Add(name);
+      values.Add(name, new List<double>());
+    }
+    public void RemoveDimension(string name) {
+      dimensions.Remove(name);
+      values.Remove(name);
+    }
+
+    public void AddDataPoint(string dimension, double value) {
+      values[dimension].Add(value);
+    }
+
+    public void SetBubbleSizeDimension(string dimension, bool inverted) {
+      this.sizeDimension = dimension;
+      this.invertSize = inverted;
+      Repaint();
+      EnforceUpdate();
+    }
+
+    public void ShowXvsY(string xDimension, string yDimension) {
+      if(this.xDimension != xDimension || this.yDimension != yDimension) {
+        this.xDimension = xDimension;
+        this.yDimension = yDimension;
+        ResetViewSize();
+        Repaint();
+        ZoomToViewSize();
+      }
+    }
+
+    public override void MouseClick(Point point, System.Windows.Forms.MouseButtons button) {
+      // should select the model in the underlying model
+    }
+
+    public override void MouseDoubleClick(Point point, System.Windows.Forms.MouseButtons button) {
+      // should open the model
+    }
+
+    internal void SetJitter(double xJitterFactor, double yJitterFactor) {
+      this.xJitterFactor = xJitterFactor * maxXJitterPercent * Size.Width;
+      this.yJitterFactor = yJitterFactor * maxYJitterPercent * Size.Height;
+      Repaint();
+      EnforceUpdate();
+    }
+
+    private void Repaint() {
+
+      List<double> xs = values[xDimension];
+      List<double> ys = values[yDimension];
+
+      List<double> sizes = null;
+      double maxSize = 1;
+      double minSize = 1;
+      if(sizeDimension != null && values.ContainsKey(sizeDimension)) {
+        sizes = values[sizeDimension];
+        maxSize = sizes.Max();
+        minSize = sizes.Min();
+      }
+      UpdateEnabled = false;
+      Group.Clear();
+      Group.Add(new Axis(this, 0, 0, AxisType.Both));
+      UpdateViewSize(0, 0, 5);
+      Group points = new Group(this);
+      int n = Math.Min(xs.Count, ys.Count);
+      if(sizes != null) n = Math.Min(n, sizes.Count);
+      for(int i = 0; i < n; i++) {
+        double x = xs[i] + (random.NextDouble() * 2.0 - 1.0) * xJitterFactor;
+        double y = ys[i] + (random.NextDouble() * 2.0 - 1.0) * yJitterFactor;
+        int size;
+        if(sizes != null) {
+          size = CalculateSize(sizes[i], minSize, maxSize);
+        } else {
+          size = minBubbleSize;
+        }
+
+        if(double.IsInfinity(x) || x == double.MaxValue || x == double.MinValue) x = double.NaN;
+        if(double.IsInfinity(y) || y == double.MaxValue || y == double.MinValue) y = double.NaN;
+        if(!double.IsNaN(x) && !double.IsNaN(y)) {
+          UpdateViewSize(x, y, size);
+          int alpha = CalculateAlpha(size);
+          Pen pen = new Pen(Color.FromArgb(alpha, defaultColor));
+          Brush brush = pen.Brush;
+          points.Add(new FixedSizeCircle(this, x, y, size, pen, brush));
+        }
+      }
+      Group.Add(points);
+      UpdateEnabled = true;
+    }
+
+    private int CalculateSize(double size, double minSize, double maxSize) {
+      double sizeDifference = ((size - minSize) / (maxSize - minSize) * (maxBubbleSize - minBubbleSize));
+      if(invertSize) return maxBubbleSize - (int)sizeDifference;
+      else return minBubbleSize + (int)sizeDifference;
+    }
+
+    private int CalculateAlpha(int size) {
+      return maxAlpha - (int)((double)(size - minBubbleSize) / (double)(maxBubbleSize - minBubbleSize) * (double)(maxAlpha - minAlpha));
+    }
+
+    private void ZoomToViewSize() {
+      if(minX < maxX && minY < maxY) {
+        // enlarge view by 5% on each side
+        double width = maxX - minX;
+        double height = maxY - minY;
+        minX = minX - width * 0.05;
+        maxX = maxX + width * 0.05;
+        minY = minY - height * 0.05;
+        maxY = maxY + height * 0.05;
+        ZoomIn(minX, minY, maxX, maxY);
+      }
+    }
+
+    private void UpdateViewSize(double x, double y, double size) {
+      if(x - size < minX) minX = x - size;
+      if(x + size > maxX) maxX = x + size;
+      if(y - size < minY) minY = y + size;
+      if(y + size > maxY) maxY = y + size;
+    }
+
+    private void ResetViewSize() {
+      minX = double.PositiveInfinity;
+      maxX = double.NegativeInfinity;
+      minY = double.PositiveInfinity;
+      maxY = double.NegativeInfinity;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.CEDMA.Charting/BubbleChartControl.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Charting/BubbleChartControl.Designer.cs	(revision 561)
+++ /trunk/sources/HeuristicLab.CEDMA.Charting/BubbleChartControl.Designer.cs	(revision 561)
@@ -0,0 +1,73 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.CEDMA.Charting {
+  partial class BubbleChartControl {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BubbleChartControl));
+      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // pictureBox
+      // 
+      this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
+      this.pictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.pictureBox.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox.Image")));
+      this.pictureBox.Size = new System.Drawing.Size(300, 263);
+      // 
+      // BubbleChartControl
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Name = "BubbleChartControl";
+      this.Size = new System.Drawing.Size(300, 263);
+      this.Controls.SetChildIndex(this.pictureBox, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+  }
+}
Index: /trunk/sources/HeuristicLab.CEDMA.Charting/BubbleChartControl.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Charting/BubbleChartControl.cs	(revision 561)
+++ /trunk/sources/HeuristicLab.CEDMA.Charting/BubbleChartControl.cs	(revision 561)
@@ -0,0 +1,54 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using HeuristicLab.Charting;
+
+namespace HeuristicLab.CEDMA.Charting {
+  public partial class BubbleChartControl : ChartControl {
+    public new BubbleChart Chart {
+      get { return (BubbleChart)base.Chart; }
+      set {
+        if (Chart != null) {
+          Chart.Update -= new EventHandler(Chart_Update);
+        }
+        base.Chart = value;
+        if (Chart != null) {
+          Chart.Update += new EventHandler(Chart_Update);
+        }
+      }
+    }
+
+    void Chart_Update(object sender, EventArgs e) {
+      // do nothing;
+    }
+
+    public BubbleChartControl() {
+      InitializeComponent();
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.CEDMA.Charting/BubbleChartControl.resx
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Charting/BubbleChartControl.resx	(revision 561)
+++ /trunk/sources/HeuristicLab.CEDMA.Charting/BubbleChartControl.resx	(revision 561)
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="pictureBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAASwAAAEHCAYAAAAUFnuAAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAABXlJREFUeF7t0DEB
+        AAAAwqD1T20JT4hAYcCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCA
+        AQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgw
+        YMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMG
+        DBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCA
+        AQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgw
+        YMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMG
+        DBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCA
+        AQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgw
+        YMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMG
+        DBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCA
+        AQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgw
+        YMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMG
+        DBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCA
+        AQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgw
+        YMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMG
+        DBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCA
+        AQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgw
+        YMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMG
+        DBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCA
+        AQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgw
+        YMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMG
+        DBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCA
+        AQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgwYMCAAQMGDBgw
+        YMCAAQMGDBi4DAzSEwABKB1lLgAAAABJRU5ErkJggg==
+</value>
+  </data>
+  <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>210, 17</value>
+  </metadata>
+</root>
Index: /trunk/sources/HeuristicLab.CEDMA.Charting/HeuristicLab.CEDMA.Charting.csproj
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Charting/HeuristicLab.CEDMA.Charting.csproj	(revision 560)
+++ /trunk/sources/HeuristicLab.CEDMA.Charting/HeuristicLab.CEDMA.Charting.csproj	(revision 561)
@@ -50,4 +50,11 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="BubbleChart.cs" />
+    <Compile Include="BubbleChartControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="BubbleChartControl.Designer.cs">
+      <DependentUpon>BubbleChartControl.cs</DependentUpon>
+    </Compile>
     <Compile Include="HeuristicLabCedmaChartingPlugin.cs" />
     <Compile Include="Histogram.cs" />
@@ -65,8 +72,4 @@
       <Project>{4F9BB789-D561-436B-B226-2BF44B7D0804}</Project>
       <Name>HeuristicLab.CEDMA.DB.Interfaces</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\HeuristicLab.Charting.Data\HeuristicLab.Charting.Data.csproj">
-      <Project>{E0740131-AA3E-4A3F-BA03-C9FF8327F4EE}</Project>
-      <Name>HeuristicLab.Charting.Data</Name>
     </ProjectReference>
     <ProjectReference Include="..\HeuristicLab.Charting\HeuristicLab.Charting.csproj">
@@ -88,4 +91,8 @@
   </ItemGroup>
   <ItemGroup>
+    <EmbeddedResource Include="BubbleChartControl.resx">
+      <DependentUpon>BubbleChartControl.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
     <EmbeddedResource Include="ResultListView.resx">
       <DependentUpon>ResultListView.cs</DependentUpon>
Index: /trunk/sources/HeuristicLab.CEDMA.Charting/HeuristicLabCedmaChartingPlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Charting/HeuristicLabCedmaChartingPlugin.cs	(revision 560)
+++ /trunk/sources/HeuristicLab.CEDMA.Charting/HeuristicLabCedmaChartingPlugin.cs	(revision 561)
@@ -29,5 +29,4 @@
   [PluginFile(Filename = "HeuristicLab.CEDMA.Charting.dll", Filetype = PluginFileType.Assembly)]
   [Dependency(Dependency = "HeuristicLab.Charting")]
-  [Dependency(Dependency = "HeuristicLab.Charting.Data")]
   [Dependency(Dependency = "HeuristicLab.Core")]
   [Dependency(Dependency = "HeuristicLab.CEDMA.DB.Interfaces")]
Index: /trunk/sources/HeuristicLab.CEDMA.Charting/ResultList.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Charting/ResultList.cs	(revision 560)
+++ /trunk/sources/HeuristicLab.CEDMA.Charting/ResultList.cs	(revision 561)
@@ -61,8 +61,9 @@
       set {
         store = value;
-        ReloadList();
-        FireChanged();
+        Action reloadList = ReloadList;
+        reloadList.BeginInvoke(null, null);
       }
     }
+
     private List<string> variableNames = new List<string>() { TARGET_VARIABLE, TREE_SIZE, TREE_HEIGHT,
     MAPE_TRAINING, MAPE_VALIDATION, MAPE_TEST,
@@ -76,5 +77,4 @@
 
     private void ReloadList() {
-      allVariables.Clear();
       List<double> trainingMAPE = new List<double>();
       List<double> validationMAPE = new List<double>();
@@ -86,13 +86,17 @@
       List<double> height = new List<double>();
       List<double> targetVariable = new List<double>();
-      allVariables[MAPE_TRAINING] = trainingMAPE;
-      allVariables[MAPE_VALIDATION] = validationMAPE;
-      allVariables[MAPE_TEST] = testMAPE;
-      allVariables[R2_TRAINING] = trainingR2;
-      allVariables[R2_VALIDATION] = validationR2;
-      allVariables[R2_TEST] = testR2;
-      allVariables[TREE_SIZE] = size;
-      allVariables[TREE_HEIGHT] = height;
-      allVariables[TARGET_VARIABLE] = targetVariable;
+
+      lock(allVariables) {
+        allVariables.Clear();
+        allVariables[MAPE_TRAINING] = trainingMAPE;
+        allVariables[MAPE_VALIDATION] = validationMAPE;
+        allVariables[MAPE_TEST] = testMAPE;
+        allVariables[R2_TRAINING] = trainingR2;
+        allVariables[R2_VALIDATION] = validationR2;
+        allVariables[R2_TEST] = testR2;
+        allVariables[TREE_SIZE] = size;
+        allVariables[TREE_HEIGHT] = height;
+        allVariables[TARGET_VARIABLE] = targetVariable;
+      }
 
       var results = store.Select(new Statement(anyEntity, new Entity(cedmaNS + "instanceOf"), new Literal("class:GpFunctionTree")))
@@ -106,34 +110,37 @@
       Random random = new Random(); // for adding random noise to int values
       foreach(Statement[] ss in results) {
-        targetVariable.Add(double.NaN);
-        size.Add(double.NaN);
-        height.Add(double.NaN);
-        trainingMAPE.Add(double.NaN);
-        validationMAPE.Add(double.NaN);
-        testMAPE.Add(double.NaN);
-        trainingR2.Add(double.NaN);
-        validationR2.Add(double.NaN);
-        testR2.Add(double.NaN);
-        foreach(Statement s in ss) {
-          if(s.Predicate.Equals(targetVariablePredicate)) {
-            ReplaceLastItem(targetVariable, (double)(int)((Literal)s.Property).Value);
-          } else if(s.Predicate.Equals(treeSizePredicate)) {
-            ReplaceLastItem(size, (double)(int)((Literal)s.Property).Value);
-          } else if(s.Predicate.Equals(treeHeightPredicate)) {
-            ReplaceLastItem(height, (double)(int)((Literal)s.Property).Value);
-          } else if(s.Predicate.Equals(trainingMAPEPredicate)) {
-            ReplaceLastItem(trainingMAPE, (double)((Literal)s.Property).Value);
-          } else if(s.Predicate.Equals(validationMAPEPredicate)) {
-            ReplaceLastItem(validationMAPE, (double)((Literal)s.Property).Value);
-          } else if(s.Predicate.Equals(testMAPEPredicate)) {
-            ReplaceLastItem(testMAPE, (double)((Literal)s.Property).Value);
-          } else if(s.Predicate.Equals(trainingR2Predicate)) {
-            ReplaceLastItem(trainingR2, (double)((Literal)s.Property).Value);
-          } else if(s.Predicate.Equals(validationR2Predicate)) {
-            ReplaceLastItem(validationR2, (double)((Literal)s.Property).Value);
-          } else if(s.Predicate.Equals(testR2Predicate)) {
-            ReplaceLastItem(testR2, (double)((Literal)s.Property).Value);
+        lock(allVariables) {
+          targetVariable.Add(double.NaN);
+          size.Add(double.NaN);
+          height.Add(double.NaN);
+          trainingMAPE.Add(double.NaN);
+          validationMAPE.Add(double.NaN);
+          testMAPE.Add(double.NaN);
+          trainingR2.Add(double.NaN);
+          validationR2.Add(double.NaN);
+          testR2.Add(double.NaN);
+          foreach(Statement s in ss) {
+            if(s.Predicate.Equals(targetVariablePredicate)) {
+              ReplaceLastItem(targetVariable, (double)(int)((Literal)s.Property).Value);
+            } else if(s.Predicate.Equals(treeSizePredicate)) {
+              ReplaceLastItem(size, (double)(int)((Literal)s.Property).Value);
+            } else if(s.Predicate.Equals(treeHeightPredicate)) {
+              ReplaceLastItem(height, (double)(int)((Literal)s.Property).Value);
+            } else if(s.Predicate.Equals(trainingMAPEPredicate)) {
+              ReplaceLastItem(trainingMAPE, (double)((Literal)s.Property).Value);
+            } else if(s.Predicate.Equals(validationMAPEPredicate)) {
+              ReplaceLastItem(validationMAPE, (double)((Literal)s.Property).Value);
+            } else if(s.Predicate.Equals(testMAPEPredicate)) {
+              ReplaceLastItem(testMAPE, (double)((Literal)s.Property).Value);
+            } else if(s.Predicate.Equals(trainingR2Predicate)) {
+              ReplaceLastItem(trainingR2, (double)((Literal)s.Property).Value);
+            } else if(s.Predicate.Equals(validationR2Predicate)) {
+              ReplaceLastItem(validationR2, (double)((Literal)s.Property).Value);
+            } else if(s.Predicate.Equals(testR2Predicate)) {
+              ReplaceLastItem(testR2, (double)((Literal)s.Property).Value);
+            }
           }
         }
+        FireChanged();
       }
     }
@@ -154,10 +161,16 @@
     internal Histogram GetHistogram(string variableName) {
       Histogram h = new Histogram(50);
-      h.AddValues(allVariables[variableName]);
+      lock(allVariables) {
+        h.AddValues(allVariables[variableName]);
+      }
       return h;
     }
 
     internal IList<double> GetValues(string variableName) {
-      return allVariables[variableName];
+      List<double> result = new List<double>();
+      lock(allVariables) {
+        result.AddRange(allVariables[variableName]);
+      }
+      return result;
     }
   }
Index: /trunk/sources/HeuristicLab.CEDMA.Charting/ResultListView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Charting/ResultListView.Designer.cs	(revision 560)
+++ /trunk/sources/HeuristicLab.CEDMA.Charting/ResultListView.Designer.cs	(revision 561)
@@ -24,5 +24,7 @@
     /// </summary>
     private void InitializeComponent() {
-      this.dataChart = new HeuristicLab.Charting.Data.DataChartControl();
+      this.yJitterLabel = new System.Windows.Forms.Label();
+      this.xJitterlabel = new System.Windows.Forms.Label();
+      this.xTrackBar = new System.Windows.Forms.TrackBar();
       this.xAxisLabel = new System.Windows.Forms.Label();
       this.xAxisComboBox = new System.Windows.Forms.ComboBox();
@@ -30,23 +32,41 @@
       this.yAxisComboBox = new System.Windows.Forms.ComboBox();
       this.yTrackBar = new System.Windows.Forms.TrackBar();
-      this.xTrackBar = new System.Windows.Forms.TrackBar();
-      this.xJitterlabel = new System.Windows.Forms.Label();
-      this.yJitterLabel = new System.Windows.Forms.Label();
+      this.dataChart = new HeuristicLab.CEDMA.Charting.BubbleChartControl();
+      this.sizeComboBox = new System.Windows.Forms.ComboBox();
+      this.sizeLabel = new System.Windows.Forms.Label();
+      this.invertCheckbox = new System.Windows.Forms.CheckBox();
+      ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).BeginInit();
       ((System.ComponentModel.ISupportInitialize)(this.yTrackBar)).BeginInit();
-      ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).BeginInit();
       this.SuspendLayout();
       // 
-      // dataChart
-      // 
-      this.dataChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.dataChart.BackColor = System.Drawing.SystemColors.Control;
-      this.dataChart.Chart = null;
-      this.dataChart.Location = new System.Drawing.Point(3, 30);
-      this.dataChart.Name = "dataChart";
-      this.dataChart.ScaleOnResize = true;
-      this.dataChart.Size = new System.Drawing.Size(447, 390);
-      this.dataChart.TabIndex = 9;
+      // yJitterLabel
+      // 
+      this.yJitterLabel.AutoSize = true;
+      this.yJitterLabel.Location = new System.Drawing.Point(3, 30);
+      this.yJitterLabel.Name = "yJitterLabel";
+      this.yJitterLabel.Size = new System.Drawing.Size(29, 13);
+      this.yJitterLabel.TabIndex = 13;
+      this.yJitterLabel.Text = "jitter:";
+      // 
+      // xJitterlabel
+      // 
+      this.xJitterlabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.xJitterlabel.AutoSize = true;
+      this.xJitterlabel.Location = new System.Drawing.Point(291, 418);
+      this.xJitterlabel.Name = "xJitterlabel";
+      this.xJitterlabel.Size = new System.Drawing.Size(29, 13);
+      this.xJitterlabel.TabIndex = 12;
+      this.xJitterlabel.Text = "jitter:";
+      // 
+      // xTrackBar
+      // 
+      this.xTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.xTrackBar.Location = new System.Drawing.Point(326, 418);
+      this.xTrackBar.Maximum = 100;
+      this.xTrackBar.Name = "xTrackBar";
+      this.xTrackBar.Size = new System.Drawing.Size(121, 45);
+      this.xTrackBar.TabIndex = 11;
+      this.xTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
+      this.xTrackBar.ValueChanged += new System.EventHandler(this.jitterTrackBar_ValueChanged);
       // 
       // xAxisLabel
@@ -54,5 +74,5 @@
       this.xAxisLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
       this.xAxisLabel.AutoSize = true;
-      this.xAxisLabel.Location = new System.Drawing.Point(197, 429);
+      this.xAxisLabel.Location = new System.Drawing.Point(305, 394);
       this.xAxisLabel.Name = "xAxisLabel";
       this.xAxisLabel.Size = new System.Drawing.Size(15, 13);
@@ -64,5 +84,5 @@
       this.xAxisComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
       this.xAxisComboBox.FormattingEnabled = true;
-      this.xAxisComboBox.Location = new System.Drawing.Point(218, 426);
+      this.xAxisComboBox.Location = new System.Drawing.Point(326, 391);
       this.xAxisComboBox.Name = "xAxisComboBox";
       this.xAxisComboBox.Size = new System.Drawing.Size(121, 21);
@@ -90,41 +110,57 @@
       // yTrackBar
       // 
-      this.yTrackBar.Location = new System.Drawing.Point(186, 3);
+      this.yTrackBar.Location = new System.Drawing.Point(38, 30);
       this.yTrackBar.Maximum = 100;
       this.yTrackBar.Name = "yTrackBar";
-      this.yTrackBar.Size = new System.Drawing.Size(60, 45);
+      this.yTrackBar.Size = new System.Drawing.Size(107, 45);
       this.yTrackBar.TabIndex = 10;
       this.yTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
-      this.yTrackBar.ValueChanged += new System.EventHandler(this.yTrackBar_ValueChanged);
-      // 
-      // xTrackBar
-      // 
-      this.xTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-      this.xTrackBar.Location = new System.Drawing.Point(387, 426);
-      this.xTrackBar.Maximum = 100;
-      this.xTrackBar.Name = "xTrackBar";
-      this.xTrackBar.Size = new System.Drawing.Size(60, 45);
-      this.xTrackBar.TabIndex = 11;
-      this.xTrackBar.TickStyle = System.Windows.Forms.TickStyle.None;
-      this.xTrackBar.ValueChanged += new System.EventHandler(this.xTrackBar_ValueChanged);
-      // 
-      // xJitterlabel
-      // 
-      this.xJitterlabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-      this.xJitterlabel.AutoSize = true;
-      this.xJitterlabel.Location = new System.Drawing.Point(352, 429);
-      this.xJitterlabel.Name = "xJitterlabel";
-      this.xJitterlabel.Size = new System.Drawing.Size(29, 13);
-      this.xJitterlabel.TabIndex = 12;
-      this.xJitterlabel.Text = "jitter:";
-      // 
-      // yJitterLabel
-      // 
-      this.yJitterLabel.AutoSize = true;
-      this.yJitterLabel.Location = new System.Drawing.Point(151, 6);
-      this.yJitterLabel.Name = "yJitterLabel";
-      this.yJitterLabel.Size = new System.Drawing.Size(29, 13);
-      this.yJitterLabel.TabIndex = 13;
-      this.yJitterLabel.Text = "jitter:";
+      this.yTrackBar.ValueChanged += new System.EventHandler(this.jitterTrackBar_ValueChanged);
+      // 
+      // dataChart
+      // 
+      this.dataChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.dataChart.BackColor = System.Drawing.SystemColors.Control;
+      this.dataChart.Chart = null;
+      this.dataChart.Location = new System.Drawing.Point(3, 81);
+      this.dataChart.Name = "dataChart";
+      this.dataChart.ScaleOnResize = true;
+      this.dataChart.Size = new System.Drawing.Size(447, 304);
+      this.dataChart.TabIndex = 9;
+      // 
+      // sizeComboBox
+      // 
+      this.sizeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.sizeComboBox.FormattingEnabled = true;
+      this.sizeComboBox.Location = new System.Drawing.Point(329, 3);
+      this.sizeComboBox.Name = "sizeComboBox";
+      this.sizeComboBox.Size = new System.Drawing.Size(121, 21);
+      this.sizeComboBox.TabIndex = 14;
+      this.sizeComboBox.SelectedIndexChanged += new System.EventHandler(this.sizeComboBox_SelectedIndexChanged);
+      // 
+      // sizeLabel
+      // 
+      this.sizeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.sizeLabel.AutoSize = true;
+      this.sizeLabel.Location = new System.Drawing.Point(259, 6);
+      this.sizeLabel.Name = "sizeLabel";
+      this.sizeLabel.Size = new System.Drawing.Size(64, 13);
+      this.sizeLabel.TabIndex = 15;
+      this.sizeLabel.Text = "Bubble size:";
+      // 
+      // invertCheckbox
+      // 
+      this.invertCheckbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+      this.invertCheckbox.AutoSize = true;
+      this.invertCheckbox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
+      this.invertCheckbox.Location = new System.Drawing.Point(326, 30);
+      this.invertCheckbox.Name = "invertCheckbox";
+      this.invertCheckbox.Size = new System.Drawing.Size(64, 17);
+      this.invertCheckbox.TabIndex = 16;
+      this.invertCheckbox.Text = "Inverse:";
+      this.invertCheckbox.UseVisualStyleBackColor = true;
+      this.invertCheckbox.CheckedChanged += new System.EventHandler(this.sizeComboBox_SelectedIndexChanged);
       // 
       // ResultListView
@@ -132,8 +168,11 @@
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.invertCheckbox);
+      this.Controls.Add(this.sizeLabel);
+      this.Controls.Add(this.sizeComboBox);
+      this.Controls.Add(this.dataChart);
       this.Controls.Add(this.yJitterLabel);
       this.Controls.Add(this.xJitterlabel);
       this.Controls.Add(this.xTrackBar);
-      this.Controls.Add(this.dataChart);
       this.Controls.Add(this.xAxisLabel);
       this.Controls.Add(this.xAxisComboBox);
@@ -142,7 +181,7 @@
       this.Controls.Add(this.yTrackBar);
       this.Name = "ResultListView";
-      this.Size = new System.Drawing.Size(450, 450);
+      this.Size = new System.Drawing.Size(450, 459);
+      ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).EndInit();
       ((System.ComponentModel.ISupportInitialize)(this.yTrackBar)).EndInit();
-      ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).EndInit();
       this.ResumeLayout(false);
       this.PerformLayout();
@@ -152,5 +191,5 @@
     #endregion
 
-    private HeuristicLab.Charting.Data.DataChartControl dataChart;
+    private BubbleChartControl dataChart;
     private System.Windows.Forms.Label xAxisLabel;
     private System.Windows.Forms.ComboBox xAxisComboBox;
@@ -161,4 +200,7 @@
     private System.Windows.Forms.Label xJitterlabel;
     private System.Windows.Forms.Label yJitterLabel;
+    private System.Windows.Forms.ComboBox sizeComboBox;
+    private System.Windows.Forms.Label sizeLabel;
+    private System.Windows.Forms.CheckBox invertCheckbox;
   }
 }
Index: /trunk/sources/HeuristicLab.CEDMA.Charting/ResultListView.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Charting/ResultListView.cs	(revision 560)
+++ /trunk/sources/HeuristicLab.CEDMA.Charting/ResultListView.cs	(revision 561)
@@ -14,4 +14,5 @@
     private ResultList results;
     private const string FREQUENCY = "<Frequency>";
+    private const string CONSTANT_SIZE = "<constant>";
     private double xJitterFactor = 0.0;
     private double yJitterFactor = 0.0;
@@ -21,9 +22,35 @@
     public ResultListView(ResultList results) {
       this.results = results;
+      results.Changed += new EventHandler(results_Changed);
       InitializeComponent();
-      dataChart.Chart = new HeuristicLab.Charting.Data.Datachart(0, 0, 100, 1);
       xAxisComboBox.Items.AddRange(results.VariableNames);
       yAxisComboBox.Items.Add(FREQUENCY);
       yAxisComboBox.Items.AddRange(results.VariableNames);
+      sizeComboBox.Items.Add(CONSTANT_SIZE);
+      sizeComboBox.Items.AddRange(results.VariableNames);
+      sizeComboBox.SelectedItem = sizeComboBox.Items[0];
+      InitChart();
+    }
+
+    private DateTime lastUpdate = DateTime.Now;
+    void results_Changed(object sender, EventArgs e) {
+      if(DateTime.Now.Subtract(lastUpdate).TotalSeconds < 3) return;
+      lastUpdate = DateTime.Now;
+      InitChart();
+    }
+
+    private void InitChart() {
+      dataChart.Chart = new BubbleChart(0, 0, 100, 100);
+      foreach(string dim in results.VariableNames) {
+        dataChart.Chart.AddDimension(dim);
+        IList<double> xs = results.GetValues(dim);
+        for(int i = 0; i < xs.Count; i++) {
+          double x = xs[i];
+          if(double.IsInfinity(x) || x == double.MaxValue || x == double.MinValue) x = double.NaN;
+          if(!double.IsNaN(x)) {
+            dataChart.Chart.AddDataPoint(dim, x);
+          }
+        }
+      }
     }
 
@@ -45,87 +72,26 @@
         CreateHistogramChart();
       } else {
-        CreateScatterplot();
+        dataChart.Chart.ShowXvsY((string)xAxisComboBox.SelectedItem, (string)yAxisComboBox.SelectedItem);
       }
     }
 
-    private void CreateScatterplot() {
-      double minX = double.PositiveInfinity;
-      double minY = double.PositiveInfinity;
-      double maxX = double.NegativeInfinity;
-      double maxY = double.NegativeInfinity;
-
-      xTrackBar.Enabled = true;
-      yTrackBar.Enabled = true;
-      Random random = new Random();
-      Color curCol = Color.FromArgb(30, Color.Blue);
-      Pen p = new Pen(curCol);
-      SolidBrush b = new SolidBrush(curCol);
-      IList<double> xs = results.GetValues((string)xAxisComboBox.SelectedItem);
-      IList<double> ys = results.GetValues((string)yAxisComboBox.SelectedItem);
-      dataChart.Chart = new HeuristicLab.Charting.Data.Datachart(0, 0, 100, 100);
-      dataChart.Chart.UpdateEnabled = false;
-      dataChart.Chart.Group.Add(new Axis(dataChart.Chart, 0, 0, AxisType.Both));
-      dataChart.Chart.AddDataRow(HeuristicLab.Charting.Data.DataRowType.Points, p, b);
-      for(int i = 0; i < xs.Count; i++) {
-        double x = xs[i] + (random.NextDouble() * 2.0 - 1.0) * xJitterFactor;
-        double y = ys[i] + (random.NextDouble() * 2.0 - 1.0) * yJitterFactor;
-        if(double.IsInfinity(x) || x == double.MaxValue || x == double.MinValue) x = double.NaN;
-        if(double.IsInfinity(y) || y == double.MaxValue || y == double.MinValue) y = double.NaN;
-        if(!double.IsNaN(x) && !double.IsNaN(y)) {
-          dataChart.Chart.AddDataPoint(0, x, y);
-          if(x > maxX) maxX = x;
-          if(y > maxY) maxY = y;
-          if(x < minX) minX = x;
-          if(y < minY) minY = y;
-        }
-      }
-      dataChart.Chart.UpdateEnabled = true;
-      if(minX<maxX && minY<maxY) dataChart.Chart.ZoomIn(minX, minY, maxX, maxY);
+    private void CreateHistogramChart() {
+      // TASK
     }
-
-    private void CreateHistogramChart() {
-      double minX = double.PositiveInfinity;
-      double minY = double.PositiveInfinity;
-      double maxX = double.NegativeInfinity;
-      double maxY = double.NegativeInfinity;
-
-      xTrackBar.Enabled = false;
-      yTrackBar.Enabled = false;
-      Color curCol = Color.Blue;
-      Pen p = new Pen(curCol);
-      SolidBrush b = new SolidBrush(curCol);
-      // frequency
-      dataChart.Chart = new HeuristicLab.Charting.Data.Datachart(0, 0, 100, 100);
-      dataChart.Chart.UpdateEnabled = false;
-      dataChart.Chart.Group.Add(new Axis(dataChart.Chart, 0, 0, AxisType.Both));
-      Histogram h = results.GetHistogram((string)xAxisComboBox.SelectedItem);
-      for(int i = 0; i < h.Buckets; i++) {
-        double lower = h.LowerValue(i);
-        double upper = h.UpperValue(i);
-        int freq = h.Frequency(i);
-        if(lower < minX) minX = lower;
-        if(upper > maxX) maxX = upper;
-        if(freq > maxY) maxY = freq;
-        dataChart.Chart.AddDataRow(HeuristicLab.Charting.Data.DataRowType.Bars, p, b);
-        dataChart.Chart.AddDataPoint(0, lower, 0);
-        dataChart.Chart.AddDataPoint(0, upper, freq);
-      }
-      minY = 0;
-      dataChart.Chart.UpdateEnabled = true;
-      if(minX < maxX && minY < maxY) dataChart.Chart.ZoomIn(minX, minY, maxX, maxY);
-    }
-
-    private void yTrackBar_ValueChanged(object sender, EventArgs e) {
+    
+    private void jitterTrackBar_ValueChanged(object sender, EventArgs e) {
       if(dataChart.Chart != null) {
-        yJitterFactor = yTrackBar.Value / 100.0 * maxYJitterPercent * dataChart.Chart.Size.Height;
+        double xJitterFactor = xTrackBar.Value / 100.0 ;
+        double yJitterFactor = yTrackBar.Value / 100.0 ;
+        dataChart.Chart.SetJitter(xJitterFactor, yJitterFactor);
       }
       UpdateChart();
     }
 
-    private void xTrackBar_ValueChanged(object sender, EventArgs e) {
+    private void sizeComboBox_SelectedIndexChanged(object sender, EventArgs e) {
       if(dataChart.Chart != null) {
-        xJitterFactor = xTrackBar.Value / 100.0 * maxXJitterPercent * dataChart.Chart.Size.Width;
+        dataChart.Chart.SetBubbleSizeDimension((string)sizeComboBox.SelectedItem, invertCheckbox.Checked);
+        UpdateChart();
       }
-      UpdateChart();
     }
   }
Index: /trunk/sources/HeuristicLab.CEDMA.Core/AgentList.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Core/AgentList.cs	(revision 560)
+++ /trunk/sources/HeuristicLab.CEDMA.Core/AgentList.cs	(revision 561)
@@ -40,16 +40,21 @@
       set {
         database = value;
-        ReloadList();
-        FireChanged();
+        Action reload = ReloadList;
+        lock(agentList) {
+          agentList.Clear();
+        }
+        reload.BeginInvoke(null, null);
       }
     }
 
     private void ReloadList() {
-      agentList.Clear();
       foreach(AgentEntry a in database.GetAgents()) {
         Agent newAgent = new Agent(Database, a.Id);
         newAgent.Name = a.Name;
         newAgent.Status = a.Status;
-        agentList.Add(newAgent);
+        lock(agentList) {
+          agentList.Add(newAgent);
+        }
+        FireChanged();
       }
     }
@@ -67,11 +72,16 @@
       long id = database.InsertAgent(null, agent.Name, PersistenceManager.SaveToGZip(agent.OperatorGraph));
       agent.Id = id;
-      agentList.Add(agent);
+      lock(agentList) {
+        agentList.Add(agent);
+      }
       FireChanged();
     }
 
     public IEnumerator<IAgent> GetEnumerator() {
-      ReloadList();
-      return agentList.GetEnumerator();
+      List<IAgent> agents = new List<IAgent>();
+      lock(agentList) {
+        agents.AddRange(agentList);
+      }
+      return agents.GetEnumerator();
     }
 
Index: /trunk/sources/HeuristicLab.CEDMA.Core/ConsoleEditor.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Core/ConsoleEditor.cs	(revision 560)
+++ /trunk/sources/HeuristicLab.CEDMA.Core/ConsoleEditor.cs	(revision 561)
@@ -35,13 +35,11 @@
     private System.Windows.Forms.TextBox uriTextBox;
     private System.Windows.Forms.Label uriLabel;
-    private System.Windows.Forms.TabControl tabControl;
-    private System.Windows.Forms.TabPage agentsPage;
     private Button connectButton;
-    private ComboBox comboBox1;
-    private Label projectLabel;
-    private Button newButton;
-    private Button opLibButton;
+    private Button openOpLibButton;
     private Label label1;
-    private TabPage resultsTabPage;
+    private Label resultsLabel;
+    private Button openResultsButton;
+    private Button openAgentsButton;
+    private Label agentsLabel;
     private Console console;
 
@@ -54,14 +52,11 @@
       this.uriTextBox = new System.Windows.Forms.TextBox();
       this.uriLabel = new System.Windows.Forms.Label();
-      this.tabControl = new System.Windows.Forms.TabControl();
-      this.agentsPage = new System.Windows.Forms.TabPage();
-      this.resultsTabPage = new System.Windows.Forms.TabPage();
       this.connectButton = new System.Windows.Forms.Button();
-      this.comboBox1 = new System.Windows.Forms.ComboBox();
-      this.projectLabel = new System.Windows.Forms.Label();
-      this.newButton = new System.Windows.Forms.Button();
-      this.opLibButton = new System.Windows.Forms.Button();
+      this.openOpLibButton = new System.Windows.Forms.Button();
       this.label1 = new System.Windows.Forms.Label();
-      this.tabControl.SuspendLayout();
+      this.resultsLabel = new System.Windows.Forms.Label();
+      this.openResultsButton = new System.Windows.Forms.Button();
+      this.openAgentsButton = new System.Windows.Forms.Button();
+      this.agentsLabel = new System.Windows.Forms.Label();
       this.SuspendLayout();
       // 
@@ -76,43 +71,9 @@
       // 
       this.uriLabel.AutoSize = true;
-      this.uriLabel.Location = new System.Drawing.Point(3, 6);
+      this.uriLabel.Location = new System.Drawing.Point(6, 6);
       this.uriLabel.Name = "uriLabel";
       this.uriLabel.Size = new System.Drawing.Size(82, 13);
       this.uriLabel.TabIndex = 1;
       this.uriLabel.Text = "CEDMA Server:";
-      // 
-      // tabControl
-      // 
-      this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.tabControl.Controls.Add(this.agentsPage);
-      this.tabControl.Controls.Add(this.resultsTabPage);
-      this.tabControl.Enabled = false;
-      this.tabControl.Location = new System.Drawing.Point(6, 85);
-      this.tabControl.Name = "tabControl";
-      this.tabControl.SelectedIndex = 0;
-      this.tabControl.Size = new System.Drawing.Size(506, 378);
-      this.tabControl.TabIndex = 2;
-      // 
-      // agentsPage
-      // 
-      this.agentsPage.Location = new System.Drawing.Point(4, 22);
-      this.agentsPage.Name = "agentsPage";
-      this.agentsPage.Padding = new System.Windows.Forms.Padding(3);
-      this.agentsPage.Size = new System.Drawing.Size(498, 352);
-      this.agentsPage.TabIndex = 1;
-      this.agentsPage.Text = "Agents";
-      this.agentsPage.UseVisualStyleBackColor = true;
-      // 
-      // resultsTabPage
-      // 
-      this.resultsTabPage.Location = new System.Drawing.Point(4, 22);
-      this.resultsTabPage.Name = "resultsTabPage";
-      this.resultsTabPage.Padding = new System.Windows.Forms.Padding(3);
-      this.resultsTabPage.Size = new System.Drawing.Size(498, 352);
-      this.resultsTabPage.TabIndex = 2;
-      this.resultsTabPage.Text = "Results";
-      this.resultsTabPage.UseVisualStyleBackColor = true;
       // 
       // connectButton
@@ -126,48 +87,19 @@
       this.connectButton.Click += new System.EventHandler(this.connectButton_Click);
       // 
-      // comboBox1
+      // openOpLibButton
       // 
-      this.comboBox1.Enabled = false;
-      this.comboBox1.FormattingEnabled = true;
-      this.comboBox1.Location = new System.Drawing.Point(94, 29);
-      this.comboBox1.Name = "comboBox1";
-      this.comboBox1.Size = new System.Drawing.Size(121, 21);
-      this.comboBox1.TabIndex = 4;
-      // 
-      // projectLabel
-      // 
-      this.projectLabel.AutoSize = true;
-      this.projectLabel.Enabled = false;
-      this.projectLabel.Location = new System.Drawing.Point(42, 32);
-      this.projectLabel.Name = "projectLabel";
-      this.projectLabel.Size = new System.Drawing.Size(43, 13);
-      this.projectLabel.TabIndex = 5;
-      this.projectLabel.Text = "Project:";
-      // 
-      // newButton
-      // 
-      this.newButton.Enabled = false;
-      this.newButton.Location = new System.Drawing.Point(221, 27);
-      this.newButton.Name = "newButton";
-      this.newButton.Size = new System.Drawing.Size(75, 23);
-      this.newButton.TabIndex = 6;
-      this.newButton.Text = "New...";
-      this.newButton.UseVisualStyleBackColor = true;
-      // 
-      // opLibButton
-      // 
-      this.opLibButton.Enabled = false;
-      this.opLibButton.Location = new System.Drawing.Point(94, 56);
-      this.opLibButton.Name = "opLibButton";
-      this.opLibButton.Size = new System.Drawing.Size(75, 23);
-      this.opLibButton.TabIndex = 7;
-      this.opLibButton.Text = "&Open";
-      this.opLibButton.UseVisualStyleBackColor = true;
-      this.opLibButton.Click += new System.EventHandler(this.opLibButton_Click);
+      this.openOpLibButton.Enabled = false;
+      this.openOpLibButton.Location = new System.Drawing.Point(94, 85);
+      this.openOpLibButton.Name = "openOpLibButton";
+      this.openOpLibButton.Size = new System.Drawing.Size(75, 23);
+      this.openOpLibButton.TabIndex = 7;
+      this.openOpLibButton.Text = "&Open";
+      this.openOpLibButton.UseVisualStyleBackColor = true;
+      this.openOpLibButton.Click += new System.EventHandler(this.opLibButton_Click);
       // 
       // label1
       // 
       this.label1.AutoSize = true;
-      this.label1.Location = new System.Drawing.Point(3, 61);
+      this.label1.Location = new System.Drawing.Point(3, 90);
       this.label1.Name = "label1";
       this.label1.Size = new System.Drawing.Size(85, 13);
@@ -175,19 +107,58 @@
       this.label1.Text = "Operator Library:";
       // 
+      // resultsLabel
+      // 
+      this.resultsLabel.AutoSize = true;
+      this.resultsLabel.Location = new System.Drawing.Point(43, 61);
+      this.resultsLabel.Name = "resultsLabel";
+      this.resultsLabel.Size = new System.Drawing.Size(45, 13);
+      this.resultsLabel.TabIndex = 9;
+      this.resultsLabel.Text = "Results:";
+      // 
+      // openResultsButton
+      // 
+      this.openResultsButton.Enabled = false;
+      this.openResultsButton.Location = new System.Drawing.Point(94, 56);
+      this.openResultsButton.Name = "openResultsButton";
+      this.openResultsButton.Size = new System.Drawing.Size(75, 23);
+      this.openResultsButton.TabIndex = 10;
+      this.openResultsButton.Text = "&Open";
+      this.openResultsButton.UseVisualStyleBackColor = true;
+      this.openResultsButton.Click += new System.EventHandler(this.openChartButton_Click);
+      // 
+      // openAgentsButton
+      // 
+      this.openAgentsButton.Enabled = false;
+      this.openAgentsButton.Location = new System.Drawing.Point(94, 27);
+      this.openAgentsButton.Name = "openAgentsButton";
+      this.openAgentsButton.Size = new System.Drawing.Size(75, 23);
+      this.openAgentsButton.TabIndex = 12;
+      this.openAgentsButton.Text = "&Open";
+      this.openAgentsButton.UseVisualStyleBackColor = true;
+      this.openAgentsButton.Click += new System.EventHandler(this.openAgentsButton_Click);
+      // 
+      // agentsLabel
+      // 
+      this.agentsLabel.AutoSize = true;
+      this.agentsLabel.Location = new System.Drawing.Point(45, 32);
+      this.agentsLabel.Name = "agentsLabel";
+      this.agentsLabel.Size = new System.Drawing.Size(43, 13);
+      this.agentsLabel.TabIndex = 11;
+      this.agentsLabel.Text = "Agents:";
+      // 
       // ConsoleEditor
       // 
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.Controls.Add(this.openAgentsButton);
+      this.Controls.Add(this.agentsLabel);
+      this.Controls.Add(this.openResultsButton);
+      this.Controls.Add(this.resultsLabel);
       this.Controls.Add(this.label1);
-      this.Controls.Add(this.opLibButton);
-      this.Controls.Add(this.newButton);
-      this.Controls.Add(this.projectLabel);
-      this.Controls.Add(this.comboBox1);
+      this.Controls.Add(this.openOpLibButton);
       this.Controls.Add(this.connectButton);
-      this.Controls.Add(this.tabControl);
       this.Controls.Add(this.uriLabel);
       this.Controls.Add(this.uriTextBox);
       this.Name = "ConsoleEditor";
-      this.Size = new System.Drawing.Size(515, 466);
-      this.tabControl.ResumeLayout(false);
+      this.Size = new System.Drawing.Size(445, 189);
       this.ResumeLayout(false);
       this.PerformLayout();
@@ -199,13 +170,7 @@
         console.Connect(uriTextBox.Text);
         connectButton.Enabled = false;
-        tabControl.Enabled = true;
-        agentsPage.Controls.Clear();
-        agentsPage.Controls.Add((Control)console.AgentList.CreateView());
-        agentsPage.Controls[0].Dock = DockStyle.Fill;
-        resultsTabPage.Controls.Clear();
-        resultsTabPage.Controls.Add((Control)console.ResultsList.CreateView());
-        resultsTabPage.Controls[0].Dock = DockStyle.Fill;
-        opLibButton.Enabled = true;
-        opLibButton.Enabled = true;
+        openOpLibButton.Enabled = true;
+        openAgentsButton.Enabled = true;
+        openResultsButton.Enabled = true;
       } catch(CommunicationException ex) {
         MessageBox.Show("Exception while trying to connect to " + uriTextBox.Text + "\n" + ex.Message);
@@ -221,4 +186,12 @@
       }
     }
+
+    private void openChartButton_Click(object sender, EventArgs e) {
+      PluginManager.ControlManager.ShowControl(console.ResultsList.CreateView());
+    }
+
+    private void openAgentsButton_Click(object sender, EventArgs e) {
+      PluginManager.ControlManager.ShowControl(console.AgentList.CreateView());
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.sln
===================================================================
--- /trunk/sources/HeuristicLab.sln	(revision 560)
+++ /trunk/sources/HeuristicLab.sln	(revision 561)
@@ -377,4 +377,5 @@
 		{1BF17271-5350-476A-8F6D-FC74FA3E82CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{1BF17271-5350-476A-8F6D-FC74FA3E82CA}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{1BF17271-5350-476A-8F6D-FC74FA3E82CA}.Debug|x86.Build.0 = Debug|Any CPU
 		{1BF17271-5350-476A-8F6D-FC74FA3E82CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{1BF17271-5350-476A-8F6D-FC74FA3E82CA}.Release|Any CPU.Build.0 = Release|Any CPU
Index: /trunk/sources/HeuristicLab/HeuristicLab.csproj
===================================================================
--- /trunk/sources/HeuristicLab/HeuristicLab.csproj	(revision 560)
+++ /trunk/sources/HeuristicLab/HeuristicLab.csproj	(revision 561)
@@ -36,4 +36,24 @@
     <WarningLevel>4</WarningLevel>
     <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release x64|x86' ">
+    <OutputPath>bin\x86\Release x64\</OutputPath>
+    <PlatformTarget>x86</PlatformTarget>
   </PropertyGroup>
   <ItemGroup>
