Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs	(revision 10846)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs	(revision 10847)
@@ -42,4 +42,5 @@
     private List<PreprocessingDataTable> dataTablePerVariable;
     private List<DataRow> dataRows;
+    private List<DataRow> selectedDataRows;
 
     protected DataRowVisualProperties.DataRowChartType chartType;
@@ -58,14 +59,24 @@
       foreach (IndexedItem<StringValue> item in checkedItems.Items) {
         string variableName = item.Value.Value;
+
+        //variable is displayed -> remove
         if (VariableIsDisplayed(variableName)) {
           dataTable.Rows.Remove(variableName);
+          dataTable.SelectedRows.Remove(variableName);
           dataTablePerVariable.Remove(dataTablePerVariable.Find(x => (x.Name == variableName)));
+        //variable isnt't displayed -> add
         } else {
           DataRow row = GetDataRow(variableName);
+          DataRow selectedRow = GetSelectedDataRow(variableName);
           dataTable.Rows.Add(row);
           PreprocessingDataTable d = new PreprocessingDataTable(variableName);
           d.Rows.Add(row);
           dataTablePerVariable.Add(d);
+          if (selectedRow != null)
+          {
+            dataTable.SelectedRows.Add(selectedRow);
+            d.SelectedRows.Add(selectedRow);
         }
+      }
       }
 
@@ -88,4 +99,5 @@
       base.RegisterContentEvents();
       Content.ChartLogic.Changed += PreprocessingData_Changed;
+      Content.ChartLogic.SelectionChanged += PreprocessingData_SelctionChanged;
 
     }
@@ -94,4 +106,5 @@
       base.DeregisterContentEvents();
       Content.ChartLogic.Changed -= PreprocessingData_Changed;
+      Content.ChartLogic.SelectionChanged -= PreprocessingData_SelctionChanged;
     }
 
@@ -109,11 +122,8 @@
       dataRows = logic.CreateAllDataRows(chartType);
 
-      // init data table
       dataTable = new PreprocessingDataTable(chartTitle);
-      dataTable.Rows.AddRange(dataRows);
-
-
-      // init data table per variable
       dataTablePerVariable = new List<PreprocessingDataTable>();
+
+      //add data rows to data tables according to checked item list
       foreach (var checkedItem in Content.VariableItemList.CheckedItems)
       {
@@ -121,14 +131,39 @@
         PreprocessingDataTable d = new PreprocessingDataTable(variableName);
         DataRow row = GetDataRow(variableName);
-        //DataRow rowSelect = logic.CreateDataRowRange(variableName, 200, 400, chartType);
-        //rowSelect.Name = variableName + "(Selected)";
-        //rowSelect.VisualProperties.Color = Color.Green;
-
+
+        //add row to data table 
+        dataTable.Rows.Add(row);
+
+        //add row to data table per variable
         d.Rows.Add(row);
-        //d.SelectedRows.Add(rowSelect);
-
         dataTablePerVariable.Add(d);
-
-      }
+      }
+
+      UpdateSelection();
+    }
+
+    private void UpdateSelection() {
+
+      //update data table selection
+      selectedDataRows = logic.CreateAllSelectedDataRows(chartType);
+      dataTable.SelectedRows.Clear();
+      dataTable.SelectedRows.AddRange(selectedDataRows);
+
+      //update data table per variable selection
+      foreach (PreprocessingDataTable d in dataTablePerVariable) {
+        d.SelectedRows.Clear();
+        DataRow row = selectedDataRows.Find(x => x.Name == d.Name);
+        if (row != null)
+          d.SelectedRows.Add(row);
+      }
+
+    }
+
+    private DataRow GetSelectedDataRow(string variableName) {
+      foreach (DataRow row in selectedDataRows) {
+        if (row.Name == variableName)
+          return row;
+      }
+      return null;
     }
 
@@ -168,8 +203,13 @@
         case DataPreprocessingChangedEventType.Any:
         default:
+           //TODO: test with transform
           InitData();
           GenerateChart();
           break;
       }
+    }
+
+    private void PreprocessingData_SelctionChanged(object sender, EventArgs e) {
+      UpdateSelection();
     }
 
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs	(revision 10846)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs	(revision 10847)
@@ -60,4 +60,9 @@
       Content.Rows.ItemsReplaced -= new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsReplaced);
       Content.Rows.CollectionReset -= new CollectionItemsChangedEventHandler<DataRow>(Rows_CollectionReset);
+
+      Content.SelectedRows.ItemsAdded -= new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsAdded);
+      Content.SelectedRows.ItemsRemoved -= new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsRemoved);
+      Content.SelectedRows.ItemsReplaced -= new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsReplaced);
+      Content.SelectedRows.CollectionReset -= new CollectionItemsChangedEventHandler<DataRow>(Rows_CollectionReset);
       base.DeregisterContentEvents();
     }
@@ -69,5 +74,11 @@
       Content.Rows.ItemsReplaced += new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsReplaced);
       Content.Rows.CollectionReset += new CollectionItemsChangedEventHandler<DataRow>(Rows_CollectionReset);
-    }
+
+      Content.SelectedRows.ItemsAdded += new CollectionItemsChangedEventHandler<DataRow>(SelectedRows_ItemsAdded);
+      Content.SelectedRows.ItemsRemoved += new CollectionItemsChangedEventHandler<DataRow>(SelectedRows_ItemsRemoved);
+      Content.SelectedRows.ItemsReplaced += new CollectionItemsChangedEventHandler<DataRow>(SelectedRows_ItemsReplaced);
+      Content.SelectedRows.CollectionReset += new CollectionItemsChangedEventHandler<DataRow>(SelectedRows_CollectionReset);
+    }
+
 
     protected virtual void RegisterDataRowEvents(DataRow row) {
@@ -141,11 +152,19 @@
       foreach (var row in rows) {
         if (row.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Line) {
-          //RegisterDataRowEvents(row);
           row.VisualProperties.IsVisibleInLegend = false;
-          var series = new Series(row.Name);
+
+          //add selected to name in order to avoid naming conflict
+          var series = new Series(row.Name+"(Selected)");
           ConfigureSeries(series, row);
           FillSeriesWithRowValues(series, row);
           chart.Series.Add(series);
         }
+      }
+    }
+
+    protected virtual void RemoveSelectedDataRows(IEnumerable<DataRow> rows) {
+      foreach (var row in rows) {
+        Series series = chart.Series[row.Name + "(Selected)"];
+        chart.Series.Remove(series);
       }
     }
@@ -307,4 +326,40 @@
     #endregion
     #region Rows Event Handlers
+
+    private void SelectedRows_CollectionReset(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
+      if (InvokeRequired)
+        Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsReplaced), sender, e);
+      else {
+        RemoveSelectedDataRows(e.OldItems);
+        AddSelectedDataRows(e.Items);
+      }
+    }
+
+    private void SelectedRows_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
+      if (InvokeRequired)
+        Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsReplaced), sender, e);
+      else {
+        RemoveSelectedDataRows(e.OldItems);
+        AddSelectedDataRows(e.Items);
+      }
+    }
+
+    private void SelectedRows_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
+      if (InvokeRequired)
+        Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsRemoved), sender, e);
+      else {
+        RemoveSelectedDataRows(e.Items);
+      }
+    }
+
+    private void SelectedRows_ItemsAdded(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
+      if (InvokeRequired)
+        Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsAdded), sender, e);
+      else {
+        AddSelectedDataRows(e.Items);
+      }
+    }
+
+
     private void Rows_ItemsAdded(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
       if (InvokeRequired)
@@ -570,4 +625,5 @@
       }
 
+
       if (!row.VisualProperties.ExactBins) {
         intervalWidth = HumanRoundRange(intervalWidth);
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs	(revision 10846)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs	(revision 10847)
@@ -22,4 +22,5 @@
 using System;
 using System.Collections.Generic;
+using System.Drawing;
 using HeuristicLab.Analysis;
 using HeuristicLab.Core;
@@ -35,4 +36,6 @@
       this.preprocessingData = preprocessingData;
     }
+
+    #region IChartLogic Members
 
     public DataRow CreateDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) {
@@ -92,4 +95,9 @@
     }
 
+    public event EventHandler SelectionChanged {
+      add { preprocessingData.SelectionChanged += value; }
+      remove { preprocessingData.SelectionChanged -= value; }
+    }
+
     public string GetVariableNameByIndex(int index) {
       return preprocessingData.GetVariableName(index);
@@ -104,4 +112,38 @@
     }
 
+    public List<DataRow> CreateAllSelectedDataRows(DataRowVisualProperties.DataRowChartType chartType) {
+      List<DataRow> dataRows = new List<DataRow>();
+      foreach (var name in GetVariableNames()) {
+        DataRow row = CreateSelectedDataRow(name, chartType);
+        if(row != null)
+          dataRows.Add(row);
+      }
+      return dataRows;
+    }
+
+    public DataRow CreateSelectedDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) {
+      
+      IDictionary<int,IList<int>> selection = preprocessingData.GetSelection();
+      int variableIndex = preprocessingData.GetColumnIndex(variableName);
+
+      if (selection.Keys.Contains(variableIndex))
+      {
+        List<int> selectedIndices = new List<int>(selection[variableIndex]);
+        //need selection with more than 1 value
+        if(selectedIndices.Count < 2)
+          return null;
+
+        int end = selectedIndices[0];      // indices are provided in reverse order
+        int start = selectedIndices[selectedIndices.Count-1];
+
+        DataRow rowSelect = CreateDataRowRange(variableName, start, end, chartType);
+        rowSelect.VisualProperties.Color = Color.Green;
+        return rowSelect;
+      }
+      else
+       return null;
+    }
+
+    #endregion
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilteredPreprocessingData.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilteredPreprocessingData.cs	(revision 10846)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/FilteredPreprocessingData.cs	(revision 10847)
@@ -186,5 +186,8 @@
     }
 
-    public event EventHandler SelectionChanged;
+    public event EventHandler SelectionChanged {
+      add { originalData.SelectionChanged += value; }
+      remove { originalData.SelectionChanged -= value; }
+    }
 
     #endregion
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataTable.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataTable.cs	(revision 10846)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataTable.cs	(revision 10847)
@@ -4,4 +4,5 @@
 using System.Text;
 using HeuristicLab.Analysis;
+using HeuristicLab.Collections;
 using HeuristicLab.Core;
 
@@ -26,10 +27,8 @@
         if (selectedRows != null) throw new InvalidOperationException("Rows already set");
         selectedRows = value;
-        //if (selectedRows != null) RegisterRowsEvents();
+        //if (selectedRows != null) RegisterSelectedRowEvents();
       }
     }
 
-
-
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IChartLogic.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IChartLogic.cs	(revision 10846)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IChartLogic.cs	(revision 10847)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using HeuristicLab.Analysis;
@@ -32,5 +33,11 @@
     event DataPreprocessingChangedEventHandler Changed;
 
+    event EventHandler SelectionChanged;
+
     ICheckedItemList<StringValue> CreateVariableItemList();
+
+    List<DataRow> CreateAllSelectedDataRows(DataRowVisualProperties.DataRowChartType chartType);
+
+    DataRow CreateSelectedDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType);
 
     DataRow CreateDataRow(string variableName,DataRowVisualProperties.DataRowChartType chartType);
