Index: trunk/sources/HeuristicLab.Visualization/3.2/DataExport/CSVDataExport.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/3.2/DataExport/CSVDataExport.cs	(revision 1781)
+++ trunk/sources/HeuristicLab.Visualization/3.2/DataExport/CSVDataExport.cs	(revision 1781)
@@ -0,0 +1,53 @@
+using System;
+using System.IO;
+using System.Windows.Forms;
+
+namespace HeuristicLab.Visualization.DataExport {
+  public class CSVDataExport : IExporter {
+    public string Name {
+      get { return "CSV Export"; }
+    }
+
+    public void Export(IChartDataRowsModel model) {
+      SaveFileDialog sfd = new SaveFileDialog();
+      sfd.Filter = "CSV Files|*.csv|All Files|*.*";
+      if (sfd.ShowDialog() != DialogResult.OK) {
+        return;
+      }
+
+      string filename = sfd.FileName;
+
+      Export(model, filename);
+    }
+
+    private static void Export(IChartDataRowsModel model, string filename) {
+      using (FileStream fs = new FileStream(filename, FileMode.Create))
+      using (StreamWriter sw = new StreamWriter(fs)) {
+        CSVWriter writer = new CSVWriter(sw);
+
+        // write headers
+        writer.AddString(model.XAxisLabel);
+        foreach (IDataRow row in model.Rows)
+          writer.AddString(row.Label);
+        writer.NewLine();
+
+        // figure out max number of rows in all data rows
+        int maxItems = 0;
+        foreach (IDataRow row in model.Rows)
+          maxItems = Math.Max(maxItems, row.Count);
+
+        // write rows
+        for (int i = 0; i < maxItems; i++) {
+          writer.AddNumber(i);
+          foreach (IDataRow row in model.Rows) {
+            if (i < row.Count)
+              writer.AddNumber(row[i]);
+            else
+              writer.AddEmpty();
+          }
+          writer.NewLine();
+        }
+      }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Visualization/3.2/DataExport/CSVWriter.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/3.2/DataExport/CSVWriter.cs	(revision 1781)
+++ trunk/sources/HeuristicLab.Visualization/3.2/DataExport/CSVWriter.cs	(revision 1781)
@@ -0,0 +1,52 @@
+using System.IO;
+
+namespace HeuristicLab.Visualization.DataExport {
+  public class CSVWriter {
+    private readonly StreamWriter sw;
+
+    private string seperator = ";";
+    private string stringQuotes = "\"";
+
+    private bool firstInLine = true;
+
+    public CSVWriter(StreamWriter sw) {
+      this.sw = sw;
+    }
+
+    public void AddString(string text) {
+      Add(stringQuotes + text + stringQuotes);
+    }
+
+    public void AddNumber(double value) {
+      Add(value.ToString());
+    }
+
+    public void AddEmpty() {
+      Add("");
+    }
+
+    private void Add(string text) {
+      if (!firstInLine)
+        sw.Write(seperator);
+
+      sw.Write(text);
+
+      firstInLine = false;
+    }
+
+    public void NewLine() {
+      sw.WriteLine();
+      firstInLine = true;
+    }
+
+    public string Seperator {
+      get { return seperator; }
+      set { seperator = value; }
+    }
+
+    public string StringQuotes {
+      get { return stringQuotes; }
+      set { stringQuotes = value; }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Visualization/3.2/DataExport/ExportDialog.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/3.2/DataExport/ExportDialog.Designer.cs	(revision 1781)
+++ trunk/sources/HeuristicLab.Visualization/3.2/DataExport/ExportDialog.Designer.cs	(revision 1781)
@@ -0,0 +1,84 @@
+﻿namespace HeuristicLab.Visualization.DataExport {
+  partial class ExportDialog {
+    /// <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 Windows Form 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() {
+      this.lbExporters = new System.Windows.Forms.ListBox();
+      this.btnSelectExporter = new System.Windows.Forms.Button();
+      this.btnCancel = new System.Windows.Forms.Button();
+      this.SuspendLayout();
+      // 
+      // lbExporters
+      // 
+      this.lbExporters.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.lbExporters.FormattingEnabled = true;
+      this.lbExporters.Location = new System.Drawing.Point(12, 12);
+      this.lbExporters.Name = "lbExporters";
+      this.lbExporters.Size = new System.Drawing.Size(204, 160);
+      this.lbExporters.TabIndex = 0;
+      // 
+      // btnSelectExporter
+      // 
+      this.btnSelectExporter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.btnSelectExporter.Location = new System.Drawing.Point(60, 184);
+      this.btnSelectExporter.Name = "btnSelectExporter";
+      this.btnSelectExporter.Size = new System.Drawing.Size(75, 23);
+      this.btnSelectExporter.TabIndex = 1;
+      this.btnSelectExporter.Text = "Select";
+      this.btnSelectExporter.UseVisualStyleBackColor = true;
+      this.btnSelectExporter.Click += new System.EventHandler(this.btnSelectExporter_Click);
+      // 
+      // btnCancel
+      // 
+      this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+      this.btnCancel.Location = new System.Drawing.Point(141, 184);
+      this.btnCancel.Name = "btnCancel";
+      this.btnCancel.Size = new System.Drawing.Size(75, 23);
+      this.btnCancel.TabIndex = 2;
+      this.btnCancel.Text = "Cancel";
+      this.btnCancel.UseVisualStyleBackColor = true;
+      this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+      // 
+      // ExportDialog
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.ClientSize = new System.Drawing.Size(228, 218);
+      this.Controls.Add(this.btnCancel);
+      this.Controls.Add(this.btnSelectExporter);
+      this.Controls.Add(this.lbExporters);
+      this.Name = "ExportDialog";
+      this.Text = "ExportDialog";
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.ListBox lbExporters;
+    private System.Windows.Forms.Button btnSelectExporter;
+    private System.Windows.Forms.Button btnCancel;
+  }
+}
Index: trunk/sources/HeuristicLab.Visualization/3.2/DataExport/ExportDialog.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/3.2/DataExport/ExportDialog.cs	(revision 1781)
+++ trunk/sources/HeuristicLab.Visualization/3.2/DataExport/ExportDialog.cs	(revision 1781)
@@ -0,0 +1,57 @@
+﻿using System;
+using System.Diagnostics;
+using System.Reflection;
+using System.Windows.Forms;
+
+namespace HeuristicLab.Visualization.DataExport {
+  public partial class ExportDialog : Form {
+    public ExportDialog() {
+      InitializeComponent();
+
+      Type[] types = Assembly.GetExecutingAssembly().GetTypes();
+      foreach (Type type in types) {
+        if (type.GetInterface(typeof (IExporter).FullName) != null) {
+          IExporter exporter = (IExporter)Activator.CreateInstance(type);
+
+          lbExporters.Items.Add(CreateListBoxItem(exporter));
+        }
+      }
+    }
+
+    private static ListBoxItem CreateListBoxItem(IExporter exporter) {
+      return new ListBoxItem(exporter);
+    }
+
+    private void btnCancel_Click(object sender, EventArgs e) {
+      selectedExporter = null;
+      Close();
+    }
+
+    private void btnSelectExporter_Click(object sender, EventArgs e) {
+      selectedExporter = ((ListBoxItem)lbExporters.SelectedItem).Exporter;
+      Close();
+    }
+
+    private IExporter selectedExporter;
+
+    public IExporter SelectedExporter {
+      get { return selectedExporter; }
+    }
+
+    private class ListBoxItem {
+      private readonly IExporter exporter;
+
+      public ListBoxItem(IExporter exporter) {
+        this.exporter = exporter;
+      }
+
+      public IExporter Exporter {
+        get { return exporter; }
+      }
+
+      public override string ToString() {
+        return exporter.Name;
+      }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Visualization/3.2/DataExport/ExportDialog.resx
===================================================================
--- trunk/sources/HeuristicLab.Visualization/3.2/DataExport/ExportDialog.resx	(revision 1781)
+++ trunk/sources/HeuristicLab.Visualization/3.2/DataExport/ExportDialog.resx	(revision 1781)
@@ -0,0 +1,120 @@
+<?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>
+</root>
Index: trunk/sources/HeuristicLab.Visualization/3.2/DataExport/IExporter.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/3.2/DataExport/IExporter.cs	(revision 1781)
+++ trunk/sources/HeuristicLab.Visualization/3.2/DataExport/IExporter.cs	(revision 1781)
@@ -0,0 +1,7 @@
+namespace HeuristicLab.Visualization.DataExport {
+  public interface IExporter {
+    void Export(IChartDataRowsModel model);
+
+    string Name { get; }
+  }
+}
Index: trunk/sources/HeuristicLab.Visualization/3.2/HeuristicLab.Visualization-3.2.csproj
===================================================================
--- trunk/sources/HeuristicLab.Visualization/3.2/HeuristicLab.Visualization-3.2.csproj	(revision 1780)
+++ trunk/sources/HeuristicLab.Visualization/3.2/HeuristicLab.Visualization-3.2.csproj	(revision 1781)
@@ -102,4 +102,13 @@
     <Compile Include="CompositeShape.cs" />
     <Compile Include="ChartDataRowsModelDataCollector.cs" />
+    <Compile Include="DataExport\CSVDataExport.cs" />
+    <Compile Include="DataExport\CSVWriter.cs" />
+    <Compile Include="DataExport\ExportDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="DataExport\ExportDialog.Designer.cs">
+      <DependentUpon>ExportDialog.cs</DependentUpon>
+    </Compile>
+    <Compile Include="DataExport\IExporter.cs" />
     <Compile Include="DataRowBase.cs" />
     <Compile Include="LabelProvider\ContinuousLabelProvider.cs" />
@@ -177,4 +186,7 @@
   </ItemGroup>
   <ItemGroup>
+    <EmbeddedResource Include="DataExport\ExportDialog.resx">
+      <DependentUpon>ExportDialog.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="LineChart.resx">
       <DependentUpon>LineChart.cs</DependentUpon>
Index: trunk/sources/HeuristicLab.Visualization/3.2/LineChart.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/3.2/LineChart.Designer.cs	(revision 1780)
+++ trunk/sources/HeuristicLab.Visualization/3.2/LineChart.Designer.cs	(revision 1781)
@@ -33,7 +33,8 @@
           this.components = new System.ComponentModel.Container();
           this.canvasUI = new HeuristicLab.Visualization.CanvasUI();
-          this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
+          this.contextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
           this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
-          this.contextMenuStrip1.SuspendLayout();
+          this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+          this.contextMenu.SuspendLayout();
           this.SuspendLayout();
           // 
@@ -53,17 +54,25 @@
           this.canvasUI.KeyDown += new System.Windows.Forms.KeyEventHandler(this.canvasUI1_KeyDown);
           // 
-          // contextMenuStrip1
+          // contextMenu
           // 
-          this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
-            this.optionsToolStripMenuItem});
-          this.contextMenuStrip1.Name = "contextMenuStrip1";
-          this.contextMenuStrip1.Size = new System.Drawing.Size(123, 26);
+          this.contextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.optionsToolStripMenuItem,
+            this.exportToolStripMenuItem});
+          this.contextMenu.Name = "contextMenuStrip1";
+          this.contextMenu.Size = new System.Drawing.Size(153, 70);
           // 
           // optionsToolStripMenuItem
           // 
           this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
-          this.optionsToolStripMenuItem.Size = new System.Drawing.Size(122, 22);
-          this.optionsToolStripMenuItem.Text = "Options";
+          this.optionsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+          this.optionsToolStripMenuItem.Text = "Opti&ons...";
           this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click);
+          // 
+          // exportToolStripMenuItem
+          // 
+          this.exportToolStripMenuItem.Name = "exportToolStripMenuItem";
+          this.exportToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+          this.exportToolStripMenuItem.Text = "E&xport...";
+          this.exportToolStripMenuItem.Click += new System.EventHandler(this.exportToolStripMenuItem_Click);
           // 
           // LineChart
@@ -74,5 +83,5 @@
           this.Name = "LineChart";
           this.Size = new System.Drawing.Size(551, 373);
-          this.contextMenuStrip1.ResumeLayout(false);
+          this.contextMenu.ResumeLayout(false);
           this.ResumeLayout(false);
 
@@ -82,6 +91,7 @@
 
         private CanvasUI canvasUI;
-        private ContextMenuStrip contextMenuStrip1;
+        private ContextMenuStrip contextMenu;
         private ToolStripMenuItem optionsToolStripMenuItem;
+        private ToolStripMenuItem exportToolStripMenuItem;
     }
 }
Index: trunk/sources/HeuristicLab.Visualization/3.2/LineChart.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/3.2/LineChart.cs	(revision 1780)
+++ trunk/sources/HeuristicLab.Visualization/3.2/LineChart.cs	(revision 1781)
@@ -5,4 +5,5 @@
 using System.Windows.Forms;
 using HeuristicLab.Core;
+using HeuristicLab.Visualization.DataExport;
 using HeuristicLab.Visualization.Legend;
 using HeuristicLab.Visualization.Options;
@@ -263,4 +264,14 @@
     }
 
+    private void exportToolStripMenuItem_Click(object sender, EventArgs e) {
+      ExportDialog exportdlg = new ExportDialog();
+      exportdlg.ShowDialog(this);
+
+      IExporter exporter = exportdlg.SelectedExporter;
+
+      if (exporter != null)
+        exporter.Export(model);
+    }
+
     public void OnDataRowChanged(IDataRow row) {
       RowEntry rowEntry = rowToRowEntry[row];
@@ -531,5 +542,5 @@
 
       if (e.Button == MouseButtons.Right) {
-        contextMenuStrip1.Show(PointToScreen(e.Location));
+        contextMenu.Show(PointToScreen(e.Location));
       } else if (e.Button == MouseButtons.Left) {
         if (ModifierKeys == Keys.None) {
Index: trunk/sources/HeuristicLab.Visualization/3.2/LineChart.resx
===================================================================
--- trunk/sources/HeuristicLab.Visualization/3.2/LineChart.resx	(revision 1780)
+++ trunk/sources/HeuristicLab.Visualization/3.2/LineChart.resx	(revision 1781)
@@ -118,5 +118,5 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+  <metadata name="contextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>17, 17</value>
   </metadata>
