Index: trunk/sources/HeuristicLab.Visualization.Test/LineChartTestForm.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization.Test/LineChartTestForm.Designer.cs	(revision 1037)
+++ trunk/sources/HeuristicLab.Visualization.Test/LineChartTestForm.Designer.cs	(revision 1038)
@@ -26,4 +26,5 @@
       this.lineChartGroupBox = new System.Windows.Forms.GroupBox();
       this.btnResetView = new System.Windows.Forms.Button();
+      this.btnAddRandomValue = new System.Windows.Forms.Button();
       this.SuspendLayout();
       // 
@@ -35,5 +36,5 @@
       this.lineChartGroupBox.Location = new System.Drawing.Point(12, 12);
       this.lineChartGroupBox.Name = "lineChartGroupBox";
-      this.lineChartGroupBox.Size = new System.Drawing.Size(607, 318);
+      this.lineChartGroupBox.Size = new System.Drawing.Size(673, 376);
       this.lineChartGroupBox.TabIndex = 0;
       this.lineChartGroupBox.TabStop = false;
@@ -43,5 +44,5 @@
       // 
       this.btnResetView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
-      this.btnResetView.Location = new System.Drawing.Point(544, 346);
+      this.btnResetView.Location = new System.Drawing.Point(610, 404);
       this.btnResetView.Name = "btnResetView";
       this.btnResetView.Size = new System.Drawing.Size(75, 23);
@@ -51,9 +52,21 @@
       this.btnResetView.Click += new System.EventHandler(this.btnResetView_Click);
       // 
+      // btnAddRandomValue
+      // 
+      this.btnAddRandomValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.btnAddRandomValue.Location = new System.Drawing.Point(529, 404);
+      this.btnAddRandomValue.Name = "btnAddRandomValue";
+      this.btnAddRandomValue.Size = new System.Drawing.Size(75, 23);
+      this.btnAddRandomValue.TabIndex = 2;
+      this.btnAddRandomValue.Text = "Add Value";
+      this.btnAddRandomValue.UseVisualStyleBackColor = true;
+      this.btnAddRandomValue.Click += new System.EventHandler(this.btnAddRandomValue_Click);
+      // 
       // LineChartTestForm
       // 
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.ClientSize = new System.Drawing.Size(631, 395);
+      this.ClientSize = new System.Drawing.Size(697, 453);
+      this.Controls.Add(this.btnAddRandomValue);
       this.Controls.Add(this.lineChartGroupBox);
       this.Controls.Add(this.btnResetView);
@@ -68,4 +81,5 @@
     private System.Windows.Forms.GroupBox lineChartGroupBox;
     private System.Windows.Forms.Button btnResetView;
+    private System.Windows.Forms.Button btnAddRandomValue;
 
   }
Index: trunk/sources/HeuristicLab.Visualization.Test/LineChartTestForm.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization.Test/LineChartTestForm.cs	(revision 1037)
+++ trunk/sources/HeuristicLab.Visualization.Test/LineChartTestForm.cs	(revision 1038)
@@ -1,16 +1,17 @@
-﻿using System.Windows.Forms;
+﻿using System;
+using System.Windows.Forms;
 using HeuristicLab.Core;
 
 namespace HeuristicLab.Visualization.Test {
   public partial class LineChartTestForm : Form {
+    private readonly IView view;
     private ChartDataRowsModel model;
-    private IView view;
 
     public LineChartTestForm() {
       InitializeComponent();
+    }
 
-      model = new ChartDataRowsModel();
-
-      
+    public LineChartTestForm(ChartDataRowsModel model) : this() {
+      this.model = model;
       view = model.CreateView();
 
@@ -21,11 +22,16 @@
     }
 
-    public ChartDataRowsModel Model {
-      get { return model; }
+    private void btnResetView_Click(object sender, EventArgs e) {
+      if (view != null) {
+        LineChart lineChart = (LineChart)view;
+        lineChart.ResetView();
+      }
     }
 
-    private void btnResetView_Click(object sender, System.EventArgs e) {
-      LineChart lineChart = (LineChart)view;
-      lineChart.ResetView();
+    private void btnAddRandomValue_Click(object sender, EventArgs e) {
+      Random rand = new Random();
+
+      foreach (IDataRow row in model.Rows)
+        row.AddValue(rand.NextDouble()*100);
     }
   }
Index: trunk/sources/HeuristicLab.Visualization.Test/LineChartTests.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization.Test/LineChartTests.cs	(revision 1037)
+++ trunk/sources/HeuristicLab.Visualization.Test/LineChartTests.cs	(revision 1038)
@@ -6,7 +6,14 @@
   [TestFixture]
   public class LineChartTests {
+    private ChartDataRowsModel model;
+
+    [SetUp]
+    public void SetUp() {
+      model = new ChartDataRowsModel();
+    }
+
     [Test]
     public void TestLineChart() {
-      LineChartTestForm f = new LineChartTestForm();
+      LineChartTestForm f = new LineChartTestForm(model);
 
       IDataRow row1 = new DataRow();
@@ -27,7 +34,7 @@
       
 
-      f.Model.AddDataRow(row1);
-      f.Model.AddDataRow(row2);
-      f.Model.AddDataRow(row3);
+      model.AddDataRow(row1);
+      model.AddDataRow(row2);
+      model.AddDataRow(row3);
 
       row1.AddValue(10);
@@ -50,5 +57,5 @@
       Random rand = new Random();
 
-      for (int i = 0; i < 1000; i++) {
+      for (int i = 0; i < 10000; i++) {
         row1.AddValue(rand.NextDouble()*10);
         row2.AddValue(rand.NextDouble()*10);
@@ -61,5 +68,5 @@
     [Test]
     public void TestAxes() {
-      LineChartTestForm f = new LineChartTestForm();
+      LineChartTestForm f = new LineChartTestForm(model);
 
       IDataRow row1 = new DataRow();
@@ -69,5 +76,5 @@
       row1.Style = DrawingStyle.Solid;
 
-      f.Model.AddDataRow(row1);
+      model.AddDataRow(row1);
 
       row1.AddValue(10);
Index: trunk/sources/HeuristicLab.Visualization.Test/MainForm.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization.Test/MainForm.cs	(revision 1037)
+++ trunk/sources/HeuristicLab.Visualization.Test/MainForm.cs	(revision 1038)
@@ -30,5 +30,5 @@
       WorldShape mainWorld = canvasUI.MainCanvas.WorldShape;
       // simple rectangle shape
-      RectangleShape rect7 = new RectangleShape(5, 5, 50, 50, 0, Color.Black);
+      RectangleShape rect7 = new RectangleShape(5, 5, 50, 50, Color.Black);
       mainWorld.AddShape(rect7);
     }
@@ -43,5 +43,5 @@
 
       for (int i = 0; i < 10000; i++) {
-        RectangleShape rect = new RectangleShape(x1, y1, x1 + 0.3, y1 + 0.3, 0, Color.Maroon);
+        RectangleShape rect = new RectangleShape(x1, y1, x1 + 0.3, y1 + 0.3, Color.Maroon);
         x1 += 0.4;
         y1 += 0.4;
@@ -57,6 +57,6 @@
       CompositeShape middleComp = new CompositeShape();
 
-      RectangleShape rect5 = new RectangleShape(400, 10, 500, 300, 0, Color.Navy);
-      RectangleShape rect6 = new RectangleShape(510, 310, 580, 590, 0, Color.Magenta);
+      RectangleShape rect5 = new RectangleShape(400, 10, 500, 300, Color.Navy);
+      RectangleShape rect6 = new RectangleShape(510, 310, 580, 590, Color.Magenta);
 
       middleComp.AddShape(rect5);
@@ -71,13 +71,13 @@
       WorldShape leftWorld = new WorldShape(new RectangleD(0, 0, 1000, 1000), new RectangleD(10, 10, 380, 590));
 
-      RectangleShape fillRect = new RectangleShape(0, 0, 1000, 1000, 0, Color.LightBlue);
+      RectangleShape fillRect = new RectangleShape(0, 0, 1000, 1000, Color.LightBlue);
 
-      RectangleShape rect1 = new RectangleShape(100, 100, 500, 500, 0, Color.Red);
-      RectangleShape rect2 = new RectangleShape(800, -200, 1200, 500, 0, Color.Green);
+      RectangleShape rect1 = new RectangleShape(100, 100, 500, 500, Color.Red);
+      RectangleShape rect2 = new RectangleShape(800, -200, 1200, 500, Color.Green);
 
       CompositeShape comp1 = new CompositeShape();
 
-      RectangleShape rect3 = new RectangleShape(510, 580, 590, 700, 0, Color.Blue);
-      RectangleShape rect4 = new RectangleShape(600, 710, 800, 900, 0, Color.Orange);
+      RectangleShape rect3 = new RectangleShape(510, 580, 590, 700, Color.Blue);
+      RectangleShape rect4 = new RectangleShape(600, 710, 800, 900, Color.Orange);
 
       comp1.AddShape(rect3);
Index: trunk/sources/HeuristicLab.Visualization/Canvas.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/Canvas.cs	(revision 1037)
+++ trunk/sources/HeuristicLab.Visualization/Canvas.cs	(revision 1038)
@@ -1,2 +1,3 @@
+using System.Diagnostics;
 using System.Drawing;
 using System.Drawing.Drawing2D;
@@ -11,5 +12,9 @@
     }
 
+
     public void Draw(Graphics graphics, Rectangle viewport) {
+      Stopwatch sw = new Stopwatch();
+      sw.Start();
+
       GraphicsState gstate = graphics.Save();
 
@@ -19,4 +24,7 @@
 
       graphics.Restore(gstate);
+
+      sw.Stop();
+      Trace.WriteLine(string.Format("Drawing time: {0:0.0}ms", sw.Elapsed.TotalMilliseconds));
     }
   }
Index: trunk/sources/HeuristicLab.Visualization/CanvasUI.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/CanvasUI.cs	(revision 1037)
+++ trunk/sources/HeuristicLab.Visualization/CanvasUI.cs	(revision 1038)
@@ -39,5 +39,5 @@
         base.OnPaint(pe);
       } catch (Exception e) {
-       Debug.WriteLine(e);
+       Trace.WriteLine(e);
       }
     }
Index: trunk/sources/HeuristicLab.Visualization/LineChart.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/LineChart.Designer.cs	(revision 1037)
+++ trunk/sources/HeuristicLab.Visualization/LineChart.Designer.cs	(revision 1038)
@@ -29,17 +29,17 @@
         private void InitializeComponent()
         {
-          this.canvasUI1 = new HeuristicLab.Visualization.CanvasUI();
+          this.canvas = new HeuristicLab.Visualization.CanvasUI();
           this.SuspendLayout();
           // 
-          // canvasUI1
+          // canvas
           // 
-          this.canvasUI1.Dock = System.Windows.Forms.DockStyle.Fill;
-          this.canvasUI1.Location = new System.Drawing.Point(0, 0);
-          this.canvasUI1.MouseEventListener = null;
-          this.canvasUI1.Name = "canvasUI1";
-          this.canvasUI1.Size = new System.Drawing.Size(552, 390);
-          this.canvasUI1.TabIndex = 0;
-          this.canvasUI1.Text = "canvasUI1";
-          this.canvasUI1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.canvasUI1_MouseDown);
+          this.canvas.Dock = System.Windows.Forms.DockStyle.Fill;
+          this.canvas.Location = new System.Drawing.Point(0, 0);
+          this.canvas.MouseEventListener = null;
+          this.canvas.Name = "canvas";
+          this.canvas.Size = new System.Drawing.Size(552, 390);
+          this.canvas.TabIndex = 0;
+          this.canvas.Text = "canvas";
+          this.canvas.MouseDown += new System.Windows.Forms.MouseEventHandler(this.canvasUI1_MouseDown);
           // 
           // LineChart
@@ -47,5 +47,5 @@
           this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
           this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-          this.Controls.Add(this.canvasUI1);
+          this.Controls.Add(this.canvas);
           this.Name = "LineChart";
           this.Size = new System.Drawing.Size(552, 390);
@@ -56,5 +56,5 @@
         #endregion
 
-        private CanvasUI canvasUI1;
+        private CanvasUI canvas;
     }
 }
Index: trunk/sources/HeuristicLab.Visualization/LineChart.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/LineChart.cs	(revision 1037)
+++ trunk/sources/HeuristicLab.Visualization/LineChart.cs	(revision 1038)
@@ -6,4 +6,22 @@
 
 namespace HeuristicLab.Visualization {
+  public class LinesShape : WorldShape {
+    private readonly RectangleShape background = new RectangleShape(0, 0, 1, 1, Color.FromArgb(240, 240, 240));
+
+    public LinesShape(RectangleD clippingArea, RectangleD boundingBox)
+      : base(clippingArea, boundingBox) {
+      AddShape(background);
+    }
+
+    public override void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) {
+      UpdateLayout();
+      base.Draw(graphics, viewport, clippingArea);
+    }
+
+    private void UpdateLayout() {
+      background.Rectangle = ClippingArea;
+    }
+  }
+
   public partial class LineChart : ViewBase {
     private readonly IChartDataRowsModel model;
@@ -14,4 +32,7 @@
 
     private readonly WorldShape root;
+    private readonly TextShape titleShape;
+    private readonly LinesShape linesShape;
+
     private readonly XAxis xAxis;
 
@@ -28,23 +49,33 @@
     /// <param name="model">Referenz to the model, for data</param>
     public LineChart(IChartDataRowsModel model) : this() {
-      if (model == null) {
+      if (model == null)
         throw new NullReferenceException("Model cannot be null.");
-      }
 
       //TODO: correct Rectangle to fit
-      RectangleD clientRectangle = new RectangleD(-1, -1, 1, 1);
-
-      root = new WorldShape(clientRectangle, clientRectangle);
-
-      xAxis = new XAxis();
+
+      RectangleD dummy = new RectangleD(0, 0, 1, 1);
+
+      root = new WorldShape(dummy, dummy);
+
+      linesShape = new LinesShape(dummy, dummy);
+      root.AddShape(linesShape);
+
+      xAxis = new XAxis(dummy, dummy);
       root.AddShape(xAxis);
 
-      canvasUI1.MainCanvas.WorldShape = root;
-          
+      titleShape = new TextShape(0, 0, "Title", 15);
+      root.AddShape(titleShape);
+
+      canvas.MainCanvas.WorldShape = root;
+      canvas.Resize += delegate { UpdateLayout(); };
+
+      UpdateLayout();
+
       CreateMouseEventListeners();
-         
+
       this.model = model;
       Item = model;
-      maxDataRowCount = 0; 
+
+      maxDataRowCount = 0;
       //The whole data rows are shown per default
       zoomFullView = true;
@@ -53,8 +84,26 @@
     }
 
+    /// <summary>
+    /// Layout management - arranges the inner shapes.
+    /// </summary>
+    private void UpdateLayout() {
+      root.ClippingArea = new RectangleD(0, 0, canvas.Width, canvas.Height);
+
+      titleShape.X = 10;
+      titleShape.Y = canvas.Height - 10;
+
+      linesShape.BoundingBox = new RectangleD(0, 20, canvas.Width, canvas.Height);
+
+      xAxis.BoundingBox = new RectangleD(linesShape.BoundingBox.X1,
+                                         0,
+                                         linesShape.BoundingBox.X2,
+                                         linesShape.BoundingBox.Y1);
+    }
+
     public void ResetView() {
       zoomFullView = true;
       ZoomToFullView();
-      canvasUI1.Invalidate();
+
+      canvas.Invalidate();
     }
 
@@ -68,7 +117,6 @@
       model.ModelChanged += OnModelChanged;
 
-      foreach (IDataRow row in model.Rows) {
+      foreach (IDataRow row in model.Rows)
         OnDataRowAdded(row);
-      }
     }
 
@@ -86,31 +134,29 @@
       if (row.Count > maxDataRowCount)
         maxDataRowCount = row.Count;
-      
+
       InitLineShapes(row);
-      InitXAxis();
-    }
-
-    private void InitXAxis() {
-      int numLabels = 0;
-
-      foreach (IDataRow row in model.Rows) {
-        numLabels = Math.Max(numLabels, row.Count);
-      }
-
-      xAxis.ClearLabels();
-
-      for (int i = 0; i < numLabels; i++) {
-        xAxis.SetLabel(i, i.ToString());
-      }
     }
 
     private void ZoomToFullView() {
-      if(!zoomFullView)
+      if (!zoomFullView)
         return;
-      RectangleD newClippingArea =  new RectangleD(-0.1,
-        minDataValue-((maxDataValue-minDataValue)*0.05),
-        maxDataRowCount-0.9,
-        maxDataValue + ((maxDataValue - minDataValue) * 0.05));
-      root.ClippingArea = newClippingArea;
+      RectangleD newClippingArea = new RectangleD(-0.1,
+                                                  minDataValue - ((maxDataValue - minDataValue)*0.05),
+                                                  maxDataRowCount - 0.9,
+                                                  maxDataValue + ((maxDataValue - minDataValue)*0.05));
+
+      SetLineClippingArea(newClippingArea);
+    }
+
+    /// <summary>
+    /// Sets the clipping area of the data to display.
+    /// </summary>
+    /// <param name="clippingArea"></param>
+    private void SetLineClippingArea(RectangleD clippingArea) {
+      linesShape.ClippingArea = clippingArea;
+      xAxis.ClippingArea = new RectangleD(linesShape.ClippingArea.X1,
+                                          xAxis.BoundingBox.Y1,
+                                          linesShape.ClippingArea.X2,
+                                          xAxis.BoundingBox.Y2);
     }
 
@@ -125,5 +171,5 @@
         lineShapes.Add(lineShape);
         // TODO each DataRow needs its own WorldShape so Y Axes can be zoomed independently.
-        root.AddShape(lineShape);
+        linesShape.AddShape(lineShape);
         maxDataValue = Math.Max(row[i], maxDataValue);
         minDataValue = Math.Min(row[i], minDataValue);
@@ -132,5 +178,6 @@
       rowToLineShapes[row] = lineShapes;
       ZoomToFullView();
-      canvasUI1.Invalidate();
+
+      canvas.Invalidate();
     }
 
@@ -150,7 +197,6 @@
       minDataValue = Math.Min(value, minDataValue);
 
-      if (index > lineShapes.Count + 1) {
+      if (index > lineShapes.Count + 1)
         throw new NotImplementedException();
-      }
 
       // new value was added
@@ -161,30 +207,26 @@
         lineShapes.Add(lineShape);
         // TODO each DataRow needs its own WorldShape so Y Axes can be zoomed independently.
-        root.AddShape(lineShape);
+        linesShape.AddShape(lineShape);
       }
 
       // not the first value
-      if (index > 0) {
+      if (index > 0)
         lineShapes[index - 1].Y2 = value;
-      }
 
       // not the last value
-      if (index > 0 && index < row.Count - 1) {
+      if (index > 0 && index < row.Count - 1)
         lineShapes[index].Y1 = value;
-      }
       ZoomToFullView();
-      canvasUI1.Invalidate();
+
+      canvas.Invalidate();
     }
 
     // TODO use action parameter
     private void OnRowValuesChanged(IDataRow row, double[] values, int index, Action action) {
-      foreach (double value in values) {
+      foreach (double value in values)
         OnRowValueChanged(row, value, index++, action);
-      }
-    }
-
-    private void OnModelChanged() {
-      InitXAxis();
-    }
+    }
+
+    private void OnModelChanged() {}
 
     #endregion
@@ -199,13 +241,11 @@
 
     public void EndUpdate() {
-      if (beginUpdateCount == 0) {
+      if (beginUpdateCount == 0)
         throw new InvalidOperationException("Too many EndUpdates.");
-      }
 
       beginUpdateCount--;
 
-      if (beginUpdateCount == 0) {
-        Invalidate();
-      }
+      if (beginUpdateCount == 0)
+        canvas.Invalidate();
     }
 
@@ -230,25 +270,25 @@
       if (ModifierKeys == Keys.Control) {
         zoomListener.StartPoint = e.Location;
-        canvasUI1.MouseEventListener = zoomListener;
+        canvas.MouseEventListener = zoomListener;
 
         r = Rectangle.Empty;
-        rectangleShape = new RectangleShape(e.X, e.Y, e.X, e.Y, 1000, Color.Blue);
+        rectangleShape = new RectangleShape(e.X, e.Y, e.X, e.Y, Color.Blue);
         rectangleShape.Opacity = 50;
 
-        root.AddShape(rectangleShape);
+        linesShape.AddShape(rectangleShape);
       } else {
         panListener.StartPoint = e.Location;
-        canvasUI1.MouseEventListener = panListener;
-
-        startClippingArea = root.ClippingArea;
+        canvas.MouseEventListener = panListener;
+
+        startClippingArea = linesShape.ClippingArea;
       }
     }
 
     private void Pan_OnMouseUp(Point startPoint, Point actualPoint) {
-      canvasUI1.MouseEventListener = null;
+      canvas.MouseEventListener = null;
     }
 
     private void Pan_OnMouseMove(Point startPoint, Point actualPoint) {
-      Rectangle viewPort = canvasUI1.ClientRectangle;
+      Rectangle viewPort = canvas.ClientRectangle;
 
       PointD worldStartPoint = Transform.ToWorld(startPoint, viewPort, startClippingArea);
@@ -264,22 +304,22 @@
       newClippingArea.Y2 = startClippingArea.Y2 - yDiff;
 
-      root.ClippingArea = newClippingArea;
+      SetLineClippingArea(newClippingArea);
       panListener.StartPoint = startPoint;
 
       zoomFullView = false; //user wants to pan => no full view
 
-      canvasUI1.Invalidate();
+      canvas.Invalidate();
     }
 
     private void Zoom_OnMouseUp(Point startPoint, Point actualPoint) {
-      canvasUI1.MouseEventListener = null;
-
-      RectangleD newClippingArea = Transform.ToWorld(r, canvasUI1.ClientRectangle, root.ClippingArea);
-      root.ClippingArea = newClippingArea;
-      root.RemoveShape(rectangleShape);
+      canvas.MouseEventListener = null;
+
+      RectangleD newClippingArea = Transform.ToWorld(r, canvas.ClientRectangle, linesShape.ClippingArea);
+      SetLineClippingArea(newClippingArea);
+      linesShape.RemoveShape(rectangleShape);
 
       zoomFullView = false; //user wants to pan => no full view
 
-      canvasUI1.Invalidate();
+      canvas.Invalidate();
     }
 
@@ -306,6 +346,7 @@
       }
 
-      rectangleShape.Rectangle = Transform.ToWorld(r, canvasUI1.ClientRectangle, root.ClippingArea);
-      canvasUI1.Invalidate();
+      rectangleShape.Rectangle = Transform.ToWorld(r, canvas.ClientRectangle, linesShape.ClippingArea);
+      
+      canvas.Invalidate();
     }
   }
Index: trunk/sources/HeuristicLab.Visualization/RectangleShape.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/RectangleShape.cs	(revision 1037)
+++ trunk/sources/HeuristicLab.Visualization/RectangleShape.cs	(revision 1038)
@@ -4,11 +4,9 @@
   public class RectangleShape : IShape {
     private RectangleD rectangle;
-    private double z;
     private Color color;
     private int opacity = 255;
 
-    public RectangleShape(double x1, double y1, double x2, double y2, double z, Color color) {
+    public RectangleShape(double x1, double y1, double x2, double y2, Color color) {
       rectangle = new RectangleD(x1, y1, x2, y2);
-      this.z = z;
       this.color = color;
     }
@@ -30,9 +28,4 @@
     }
 
-    public double Z {
-      get { return z; }
-      set { z = value; }
-    }
-
     public int Opacity {
       get { return opacity; }
@@ -44,4 +37,9 @@
       set { rectangle = value; }
     }
+
+    public Color Color {
+      get { return color; }
+      set { color = value; }
+    }
   }
 }
Index: trunk/sources/HeuristicLab.Visualization/WorldShape.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/WorldShape.cs	(revision 1037)
+++ trunk/sources/HeuristicLab.Visualization/WorldShape.cs	(revision 1038)
@@ -8,5 +8,5 @@
     private RectangleD boundingBox;
 
-    private readonly List<IShape> shapes = new List<IShape>();
+    protected readonly List<IShape> shapes = new List<IShape>();
 
     public WorldShape(RectangleD clippingArea, RectangleD boundingBox) {
@@ -15,5 +15,5 @@
     }
 
-    public void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) {
+    public virtual void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) {
       GraphicsState gstate = graphics.Save();
 
@@ -29,9 +29,7 @@
     }
 
-    /// <summary>
-    /// 
-    /// </summary>
     public RectangleD BoundingBox {
       get { return boundingBox; }
+      set { boundingBox = value; }
     }
 
@@ -41,8 +39,4 @@
     }
 
-    /// <summary>
-    /// adds a shape to the WorldShape
-    /// </summary>
-    /// <param name="shape">shape to add</param>
     public void AddShape(IShape shape) {
       shapes.Add(shape);
Index: trunk/sources/HeuristicLab.Visualization/XAxis.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/XAxis.cs	(revision 1037)
+++ trunk/sources/HeuristicLab.Visualization/XAxis.cs	(revision 1038)
@@ -5,15 +5,21 @@
   // TODO move to own file
   public class TextShape : IShape {
-    private readonly double x;
-    private readonly double y;
+    private double x;
+    private double y;
     private string text;
 
-    private Font font = new Font("Arial", 8);
-    private Brush brush = new SolidBrush(Color.Blue);
+    private Font font;
+    private Color color;
+    private Brush brush;
 
-    public TextShape(double x, double y, string text) {
+    public TextShape(double x, double y, string text) : this(x, y, text, 8) {}
+
+    public TextShape(double x, double y, string text, int fontSize) {
       this.x = x;
       this.y = y;
       this.text = text;
+      this.font = new Font("Arial", fontSize);
+
+      this.Color = Color.Blue;
     }
 
@@ -33,32 +39,57 @@
       set { text = value; }
     }
+
+    public double X {
+      get { return x; }
+      set { x = value; }
+    }
+
+    public double Y {
+      get { return y; }
+      set { y = value; }
+    }
+
+    public Color Color {
+      get { return color; }
+      set {
+        this.color = value;
+        this.brush = new SolidBrush(color);
+      }
+    }
   }
 
-  public class XAxis : CompositeShape {
-    private readonly List<TextShape> labels = new List<TextShape>();
-    private readonly LineShape axisLine = new LineShape(0, 0, 0, 0, 0, Color.Black, 1, DrawingStyle.Solid);
+  public class XAxis : WorldShape {
+    private readonly IDictionary<int, TextShape> labels = new Dictionary<int, TextShape>();
+
+    public XAxis(RectangleD clippingArea, RectangleD boundingBox)
+      : base(clippingArea, boundingBox) {}
 
     public void ClearLabels() {
-      shapes.Clear();
       labels.Clear();
+    }
 
-      shapes.Add(axisLine);
+    public void SetLabel(int i, string text) {
+      labels[i] = new TextShape(i, 0, text);
     }
 
     public override void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) {
-      axisLine.X1 = Transform.ToWorldX(viewport.Left, viewport, clippingArea);
-      axisLine.X2 = Transform.ToWorldX(viewport.Right, viewport, clippingArea);
+      shapes.Clear();
+
+      for (int i = (int)(ClippingArea.X1 - 1); i <= ClippingArea.X2 + 1; i++) {
+        TextShape label;
+
+        if (labels.ContainsKey(i)) {
+          label = labels[i];
+        } else {
+          label = new TextShape(i, 0, i.ToString());
+        }
+
+        label.Y = ClippingArea.Height - 3;
+
+        shapes.Add(label);
+      }
 
       base.Draw(graphics, viewport, clippingArea);
     }
-
-    public void SetLabel(int i, string text) {
-      while (i >= labels.Count) {
-        TextShape label = new TextShape(i, 0, i.ToString());
-        labels.Add(label);
-        AddShape(label);
-      }
-      labels[i].Text = text;
-    }
   }
 }
