Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.Designer.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.Designer.cs	(revision 10735)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.Designer.cs	(revision 10736)
@@ -24,5 +24,32 @@
     /// </summary>
     private void InitializeComponent() {
+      this.optionsBox = new System.Windows.Forms.GroupBox();
+      this.allInOneCheckBox = new System.Windows.Forms.CheckBox();
+      this.optionsBox.SuspendLayout();
       this.SuspendLayout();
+      // 
+      // optionsBox
+      // 
+      this.optionsBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.optionsBox.Controls.Add(this.allInOneCheckBox);
+      this.optionsBox.Location = new System.Drawing.Point(4, 263);
+      this.optionsBox.Name = "optionsBox";
+      this.optionsBox.Size = new System.Drawing.Size(152, 134);
+      this.optionsBox.TabIndex = 7;
+      this.optionsBox.TabStop = false;
+      this.optionsBox.Text = "Options";
+      // 
+      // allInOneCheckBox
+      // 
+      this.allInOneCheckBox.AutoSize = true;
+      this.allInOneCheckBox.Checked = true;
+      this.allInOneCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
+      this.allInOneCheckBox.Location = new System.Drawing.Point(6, 19);
+      this.allInOneCheckBox.Name = "allInOneCheckBox";
+      this.allInOneCheckBox.Size = new System.Drawing.Size(69, 17);
+      this.allInOneCheckBox.TabIndex = 0;
+      this.allInOneCheckBox.Text = "All in one";
+      this.allInOneCheckBox.UseVisualStyleBackColor = true;
+      this.allInOneCheckBox.CheckedChanged += new System.EventHandler(this.allInOneCheckBox_CheckedChanged);
       // 
       // HistogramView
@@ -30,5 +57,9 @@
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.optionsBox);
       this.Name = "HistogramView";
+      this.Controls.SetChildIndex(this.optionsBox, 0);
+      this.optionsBox.ResumeLayout(false);
+      this.optionsBox.PerformLayout();
       this.ResumeLayout(false);
 
@@ -37,4 +68,7 @@
     #endregion
 
+    private System.Windows.Forms.GroupBox optionsBox;
+    private System.Windows.Forms.CheckBox allInOneCheckBox;
+
   }
 }
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.cs	(revision 10735)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.cs	(revision 10736)
@@ -1,3 +1,4 @@
-﻿using System.Windows.Forms;
+﻿using System;
+using System.Windows.Forms;
 using HeuristicLab.Analysis;
 using HeuristicLab.MainForm;
@@ -22,4 +23,12 @@
     }
 
+    private void allInOneCheckBox_CheckedChanged(object sender, EventArgs e) {
+      if (allInOneMode == false)
+        allInOneMode = true;
+      else
+        allInOneMode = false;
+      GenerateChart();
+    }
+
   }
 }
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/LineChartView.Designer.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/LineChartView.Designer.cs	(revision 10735)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/LineChartView.Designer.cs	(revision 10736)
@@ -24,30 +24,32 @@
     /// </summary>
     private void InitializeComponent() {
-      this.groupBox1 = new System.Windows.Forms.GroupBox();
-      this.checkBox1 = new System.Windows.Forms.CheckBox();
-      this.groupBox1.SuspendLayout();
+      this.optionsBox = new System.Windows.Forms.GroupBox();
+      this.allInOneCheckBox = new System.Windows.Forms.CheckBox();
+      this.optionsBox.SuspendLayout();
       this.SuspendLayout();
       // 
-      // groupBox1
+      // optionsBox
       // 
-      this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.groupBox1.Controls.Add(this.checkBox1);
-      this.groupBox1.Location = new System.Drawing.Point(4, 262);
-      this.groupBox1.Name = "groupBox1";
-      this.groupBox1.Size = new System.Drawing.Size(151, 134);
-      this.groupBox1.TabIndex = 7;
-      this.groupBox1.TabStop = false;
-      this.groupBox1.Text = "Options";
+      this.optionsBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.optionsBox.Controls.Add(this.allInOneCheckBox);
+      this.optionsBox.Location = new System.Drawing.Point(4, 262);
+      this.optionsBox.Name = "optionsBox";
+      this.optionsBox.Size = new System.Drawing.Size(151, 134);
+      this.optionsBox.TabIndex = 7;
+      this.optionsBox.TabStop = false;
+      this.optionsBox.Text = "Options";
       // 
-      // checkBox1
+      // allInOneCheckBox
       // 
-      this.checkBox1.AutoSize = true;
-      this.checkBox1.Location = new System.Drawing.Point(7, 20);
-      this.checkBox1.Name = "checkBox1";
-      this.checkBox1.Size = new System.Drawing.Size(66, 17);
-      this.checkBox1.TabIndex = 0;
-      this.checkBox1.Text = "AllInOne";
-      this.checkBox1.UseVisualStyleBackColor = true;
-      this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
+      this.allInOneCheckBox.AutoSize = true;
+      this.allInOneCheckBox.Checked = true;
+      this.allInOneCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
+      this.allInOneCheckBox.Location = new System.Drawing.Point(6, 19);
+      this.allInOneCheckBox.Name = "allInOneCheckBox";
+      this.allInOneCheckBox.Size = new System.Drawing.Size(69, 17);
+      this.allInOneCheckBox.TabIndex = 0;
+      this.allInOneCheckBox.Text = "All in one";
+      this.allInOneCheckBox.UseVisualStyleBackColor = true;
+      this.allInOneCheckBox.CheckedChanged += new System.EventHandler(this.allInOneCheckBox_CheckedChanged);
       // 
       // LineChartView
@@ -55,9 +57,9 @@
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.groupBox1);
+      this.Controls.Add(this.optionsBox);
       this.Name = "LineChartView";
-      this.Controls.SetChildIndex(this.groupBox1, 0);
-      this.groupBox1.ResumeLayout(false);
-      this.groupBox1.PerformLayout();
+      this.Controls.SetChildIndex(this.optionsBox, 0);
+      this.optionsBox.ResumeLayout(false);
+      this.optionsBox.PerformLayout();
       this.ResumeLayout(false);
 
@@ -66,6 +68,6 @@
     #endregion
 
-    private System.Windows.Forms.GroupBox groupBox1;
-    private System.Windows.Forms.CheckBox checkBox1;
+    private System.Windows.Forms.GroupBox optionsBox;
+    private System.Windows.Forms.CheckBox allInOneCheckBox;
   }
 }
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/LineChartView.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/LineChartView.cs	(revision 10735)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/LineChartView.cs	(revision 10736)
@@ -44,5 +44,5 @@
     }
 
-    private void checkBox1_CheckedChanged(object sender, EventArgs e) {
+    private void allInOneCheckBox_CheckedChanged(object sender, EventArgs e) {
       if (allInOneMode == false)
         allInOneMode = true;
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs	(revision 10735)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs	(revision 10736)
@@ -46,5 +46,5 @@
     protected DataRowVisualProperties.DataRowChartType chartType;
     protected string chartTitle;
-    protected bool allInOneMode = true;
+    protected bool allInOneMode;
 
     private const string DEFAULT_CHART_TITLE = "Chart";
@@ -55,4 +55,5 @@
       chartType = DataRowVisualProperties.DataRowChartType.Line;
       chartTitle = DEFAULT_CHART_TITLE;
+      allInOneMode = true;
     }
 
@@ -97,14 +98,11 @@
     protected override void RegisterContentEvents() {
       base.RegisterContentEvents();
-      Content.Changed += Content_Changed;
+      Content.ChartLogic.Changed += PreprocessingData_Changed;
+      
     }
 
     protected override void DeregisterContentEvents() {
       base.DeregisterContentEvents();
-      Content.Changed -= Content_Changed;
-    }
-
-    void Content_Changed(object sender, DataPreprocessingChangedEventArgs e) {
-      dataTableView.Refresh();
+      Content.ChartLogic.Changed -= PreprocessingData_Changed;
     }
 
@@ -116,4 +114,5 @@
     private void InitData() {
       variableItemList = logic.CreateVariableItemList();
+      checkedItemList.Content = variableItemList;
       dataRows = logic.CreateAllDataRows(chartType);
 
@@ -147,9 +146,7 @@
       if (Content != null) {
         logic = Content.ChartLogic;
-        InitData();
-        checkedItemList.Content = variableItemList;
-        GenerateChart();
+        InitData();       
         variableItemList.CheckedItemsChanged += CheckedItemsChanged;
-        logic.Changed += PreprocessingData_Changed;
+        GenerateChart();                
       }
     }
@@ -166,9 +163,12 @@
         case DataPreprocessingChangedEventType.ChangeColumn:
         case DataPreprocessingChangedEventType.ChangeItem:
-          //UpdateDataForVariable(logic.GetVariableNameByIndex(e.Column));
-
+          UpdateDataForVariable(logic.GetVariableNameByIndex(e.Column));
           break;
         case DataPreprocessingChangedEventType.DeleteRow:
         case DataPreprocessingChangedEventType.AddRow:
+        case DataPreprocessingChangedEventType.Any:
+          InitData();
+          GenerateChart();
+          
           break;
       }
@@ -179,7 +179,9 @@
       dataTable.Rows.Remove(variableName);
       dataTable.Rows.Add(newRow);
-      DataTable dt = dataTablePerVariable.Find(x => (x.Rows.ItemName == variableName));
-      dt.Rows.Remove(variableName);
-      dt.Rows.Add(newRow);
+      DataTable dt = dataTablePerVariable.Find(x => x.Rows.Find(y => y.Name == variableName) != null);
+      if (dt != null) {
+        dt.Rows.Remove(variableName);
+        dt.Rows.Add(newRow);
+      }
     }
 
@@ -210,4 +212,13 @@
     protected void GenerateChart() {
 
+      ClearTableLayout();  
+
+      if (allInOneMode) {
+        GenerateSingleChartLayout();
+      } else
+        GenerateMultiChartLayout();
+    }
+
+    private void ClearTableLayout() {
       //Clear out the existing controls
       tableLayoutPanel.Controls.Clear();
@@ -217,11 +228,6 @@
       tableLayoutPanel.RowStyles.Clear();
       tableLayoutPanel.AutoScroll = false;
-      tableLayoutPanel.AutoScroll = true;    
-
-      if (allInOneMode) {
-        GenerateSingleChartLayout();
-      } else
-        GenerateMultiChartLayout();
-    }
+      tableLayoutPanel.AutoScroll = true;
+    }   
 
     private void GenerateSingleChartLayout() {
Index: branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs
===================================================================
--- branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs	(revision 10735)
+++ branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs	(revision 10736)
@@ -38,8 +38,21 @@
     public DataRow CreateDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) {
       IList<double> values = preprocessingData.GetValues<double>(variableName);
+
+      //TODO: handle NAN values correctly
+      // CalculateHistogram in DataTableView fails with NAN values ( Min(), Max() returns NAN)
+      ReplayNANwithZero(values);
       DataRow row = new DataRow(variableName, "", values);
       row.VisualProperties.ChartType = chartType;
       return row;
     }
+
+    private void ReplayNANwithZero(IList<double> values) {
+      for (int i = 0; i < values.Count; i++) {
+        if (Double.IsNaN(values[i]))
+          values[i] = 0;
+      }
+    }
+
+
 
     private IEnumerable<string> GetVariableNames() {
