Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.Designer.cs	(revision 10866)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.Designer.cs	(revision 10867)
@@ -25,5 +25,6 @@
     private void InitializeComponent() {
       this.optionsBox = new System.Windows.Forms.GroupBox();
-      this.allInOneCheckBox = new System.Windows.Forms.CheckBox();
+      this.label1 = new System.Windows.Forms.Label();
+      this.classifierComboBox = new System.Windows.Forms.ComboBox();
       this.optionsBox.SuspendLayout();
       this.SuspendLayout();
@@ -32,5 +33,6 @@
       // 
       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.Controls.Add(this.label1);
+      this.optionsBox.Controls.Add(this.classifierComboBox);
       this.optionsBox.Location = new System.Drawing.Point(4, 263);
       this.optionsBox.Name = "optionsBox";
@@ -40,14 +42,21 @@
       this.optionsBox.Text = "Options";
       // 
-      // allInOneCheckBox
+      // label1
       // 
-      this.allInOneCheckBox.AutoSize = true;
-      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);
+      this.label1.AutoSize = true;
+      this.label1.Location = new System.Drawing.Point(6, 26);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(91, 13);
+      this.label1.TabIndex = 2;
+      this.label1.Text = "Classifier variable:";
+      // 
+      // classifierComboBox
+      // 
+      this.classifierComboBox.FormattingEnabled = true;
+      this.classifierComboBox.Location = new System.Drawing.Point(6, 52);
+      this.classifierComboBox.Name = "classifierComboBox";
+      this.classifierComboBox.Size = new System.Drawing.Size(121, 21);
+      this.classifierComboBox.TabIndex = 1;
+      this.classifierComboBox.SelectedIndexChanged += new System.EventHandler(this.classifierComboBox_SelectedIndexChanged);
       // 
       // HistogramView
@@ -67,5 +76,6 @@
 
     private System.Windows.Forms.GroupBox optionsBox;
-    private System.Windows.Forms.CheckBox allInOneCheckBox;
+    private System.Windows.Forms.ComboBox classifierComboBox;
+    private System.Windows.Forms.Label label1;
 
   }
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.cs	(revision 10866)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.cs	(revision 10867)
@@ -18,4 +18,26 @@
     }
 
+    protected override void OnContentChanged()
+    {
+      base.OnContentChanged();
+      if (Content != null)
+      {
+        logic = Content.ChartLogic;
+        Content.AllInOneMode = false;
+
+        classifierComboBox.Items.Clear();
+
+        classifierComboBox.Items.Add("None");
+
+        foreach(string var in logic.GetVariableNames()){
+          classifierComboBox.Items.Add(var);
+        }
+
+        if (classifierComboBox.SelectedIndex == -1) {
+          classifierComboBox.SelectedIndex = 0;
+        }
+      }
+    }
+
     public new HistogramContent Content {
       get { return (HistogramContent)base.Content; }
@@ -23,21 +45,20 @@
     }
 
-    private void allInOneCheckBox_CheckedChanged(object sender, EventArgs e) {
-      if (allInOneCheckBox.Checked)
-        Content.AllInOneMode = true;
-      else
-        Content.AllInOneMode = false;
+    private void classifierComboBox_SelectedIndexChanged(object sender, EventArgs e)
+    {
+      if (classifierComboBox.SelectedItem == null)
+        return;
+
+
+      if (classifierComboBox.SelectedIndex != 0)
+      {
+        classification = logic.GetVariableValues(classifierComboBox.SelectedItem.ToString());
+      }
+      else {
+        classification = null;
+      }
+
       GenerateChart();
     }
-
-    protected override void OnContentChanged()
-    {
-      base.OnContentChanged();
-      if (Content != null)
-      {
-        allInOneCheckBox.Checked = Content.AllInOneMode;
-      }
-    }
-
   }
 }
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/LineChartView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/LineChartView.cs	(revision 10866)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/LineChartView.cs	(revision 10867)
@@ -45,8 +45,6 @@
 
     private void allInOneCheckBox_CheckedChanged(object sender, EventArgs e) {
-      if (allInOneCheckBox.Checked)
-        Content.AllInOneMode = true;
-      else
-        Content.AllInOneMode = false;
+      Content.AllInOneMode = allInOneCheckBox.Checked;
+ 
       GenerateChart();
     }
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs	(revision 10866)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs	(revision 10867)
@@ -38,5 +38,4 @@
   public partial class PreprocessingChartView : ItemView {
 
-    private IChartLogic logic;
     private PreprocessingDataTable dataTable;
     private List<PreprocessingDataTable> dataTablePerVariable;
@@ -46,7 +45,9 @@
     protected DataRowVisualProperties.DataRowChartType chartType;
     protected string chartTitle;
+    protected IChartLogic logic;
 
     private const string DEFAULT_CHART_TITLE = "Chart";
 
+    public List<double> classification { get; set; }
 
     public PreprocessingChartView() {
@@ -335,4 +336,5 @@
 
           PreprocessingDataTableView dataView = new PreprocessingDataTableView();
+          dataView.classification = classification;
           enumerator.MoveNext();
           PreprocessingDataTable d = enumerator.Current;
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs	(revision 10866)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs	(revision 10867)
@@ -31,17 +31,23 @@
 using HeuristicLab.MainForm;
 
-namespace HeuristicLab.Analysis.Views {
+namespace HeuristicLab.Analysis.Views
+{
   [View("Preprocessing DataTable View")]
   [Content(typeof(PreprocessingDataTable), false)]
-  public partial class PreprocessingDataTableView : ItemView, IConfigureableView {
+  public partial class PreprocessingDataTableView : ItemView, IConfigureableView
+  {
     protected List<Series> invisibleSeries;
     protected Dictionary<IObservableList<double>, DataRow> valuesRowsTable;
 
-    public new PreprocessingDataTable Content {
+    public new PreprocessingDataTable Content
+    {
       get { return (PreprocessingDataTable)base.Content; }
       set { base.Content = value; }
     }
 
-    public PreprocessingDataTableView() {
+    public List<double> classification { get; set; }
+
+    public PreprocessingDataTableView()
+    {
       InitializeComponent();
       valuesRowsTable = new Dictionary<IObservableList<double>, DataRow>();
@@ -52,5 +58,6 @@
 
     #region Event Handler Registration
-    protected override void DeregisterContentEvents() {
+    protected override void DeregisterContentEvents()
+    {
       foreach (DataRow row in Content.Rows)
         DeregisterDataRowEvents(row);
@@ -67,5 +74,6 @@
       base.DeregisterContentEvents();
     }
-    protected override void RegisterContentEvents() {
+    protected override void RegisterContentEvents()
+    {
       base.RegisterContentEvents();
       Content.VisualPropertiesChanged += new EventHandler(Content_VisualPropertiesChanged);
@@ -92,5 +100,6 @@
       row.Values.CollectionReset += new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_CollectionReset);
     }
-    protected virtual void DeregisterDataRowEvents(DataRow row) {
+    protected virtual void DeregisterDataRowEvents(DataRow row)
+    {
       row.Values.ItemsAdded -= new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsAdded);
       row.Values.ItemsRemoved -= new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsRemoved);
@@ -104,5 +113,6 @@
     #endregion
 
-    protected override void OnContentChanged() {
+    protected override void OnContentChanged()
+    {
       base.OnContentChanged();
       invisibleSeries.Clear();
@@ -111,5 +121,11 @@
       chart.ChartAreas[0].AxisY2.Title = string.Empty;
       chart.Series.Clear();
-      if (Content != null) {
+      if (Content != null)
+      {
+
+        if (classification != null)
+        {
+          chart.Titles[0].Text = Content.Name;
+        }
 
         AddDataRows(Content.Rows);
@@ -120,18 +136,25 @@
     }
 
-    protected override void SetEnabledStateOfControls() {
+    protected override void SetEnabledStateOfControls()
+    {
       base.SetEnabledStateOfControls();
       chart.Enabled = Content != null;
     }
 
-    public void ShowConfiguration() {
-      if (Content != null) {
-        using (var dialog = new DataTableVisualPropertiesDialog(Content)) {
+    public void ShowConfiguration()
+    {
+      if (Content != null)
+      {
+        using (var dialog = new DataTableVisualPropertiesDialog(Content))
+        {
           dialog.ShowDialog(this);
         }
-      } else MessageBox.Show("Nothing to configure.");
-    }
-    protected virtual void AddDataRows(IEnumerable<DataRow> rows) {
-      foreach (var row in rows) {
+      }
+      else MessageBox.Show("Nothing to configure.");
+    }
+    protected virtual void AddDataRows(IEnumerable<DataRow> rows)
+    {
+      foreach (var row in rows)
+      {
         RegisterDataRowEvents(row);
         var series = new Series(row.Name);
@@ -140,5 +163,9 @@
         ConfigureSeries(series, row);
         FillSeriesWithRowValues(series, row);
-        chart.Series.Add(series);
+
+        if (classification == null)
+        {
+          chart.Series.Add(series);
+        }
       }
 
@@ -172,5 +199,10 @@
           ConfigureSeries(series, row);
           FillSeriesWithRowValues(series, row);
-          chart.Series.Add(series);
+
+          if (classification == null)
+          {
+            chart.Series.Add(series);
+          }
+
         }
       }
@@ -202,5 +234,6 @@
     }
 
-    private void ConfigureSeries(Series series, DataRow row) {
+    private void ConfigureSeries(Series series, DataRow row)
+    {
       RemoveCustomPropertyIfExists(series, "PointWidth");
       series.BorderWidth = 1;
@@ -223,5 +256,6 @@
           if (!chart.Series.Any(x => x.ChartType != SeriesChartType.Bar && x.ChartType != SeriesChartType.StackedBar && x.ChartType != SeriesChartType.StackedBar100))
             series.ChartType = SeriesChartType.Bar;
-          else {
+          else
+          {
             series.ChartType = SeriesChartType.FastPoint; //default
             row.VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Points;
@@ -235,5 +269,5 @@
           break;
         case DataRowVisualProperties.DataRowChartType.Histogram:
-          series.ChartType = SeriesChartType.Column;
+          series.ChartType = SeriesChartType.StackedColumn;
           series.SetCustomProperty("PointWidth", "1");
           if (!series.Color.IsEmpty && series.Color.GetBrightness() < 0.25)
@@ -267,5 +301,6 @@
     }
 
-    private void ConfigureChartArea(ChartArea area) {
+    private void ConfigureChartArea(ChartArea area)
+    {
       if (Content.VisualProperties.TitleFont != null) chart.Titles[0].Font = Content.VisualProperties.TitleFont;
       if (!Content.VisualProperties.TitleColor.IsEmpty) chart.Titles[0].ForeColor = Content.VisualProperties.TitleColor;
@@ -294,7 +329,9 @@
     }
 
-    private void RecalculateAxesScale(ChartArea area) {
+    private void RecalculateAxesScale(ChartArea area)
+    {
       // Reset the axes bounds so that RecalculateAxesScale() will assign new bounds
-      foreach (Axis a in area.Axes) {
+      foreach (Axis a in area.Axes)
+      {
         a.Minimum = double.NaN;
         a.Maximum = double.NaN;
@@ -318,5 +355,6 @@
     }
 
-    protected virtual void UpdateYCursorInterval() {
+    protected virtual void UpdateYCursorInterval()
+    {
       double interestingValuesRange = (
         from series in chart.Series
@@ -337,8 +375,10 @@
     #region Event Handlers
     #region Content Event Handlers
-    private void Content_VisualPropertiesChanged(object sender, EventArgs e) {
+    private void Content_VisualPropertiesChanged(object sender, EventArgs e)
+    {
       if (InvokeRequired)
         Invoke(new EventHandler(Content_VisualPropertiesChanged), sender, e);
-      else {
+      else
+      {
         ConfigureChartArea(chart.ChartAreas[0]);
         RecalculateAxesScale(chart.ChartAreas[0]); // axes min/max could have changed
@@ -386,27 +426,34 @@
       if (InvokeRequired)
         Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsAdded), sender, e);
-      else {
+      else
+      {
         AddDataRows(e.Items);
       }
     }
-    private void Rows_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
+    private void Rows_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<DataRow> e)
+    {
       if (InvokeRequired)
         Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsRemoved), sender, e);
-      else {
+      else
+      {
         RemoveDataRows(e.Items);
       }
     }
-    private void Rows_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
+    private void Rows_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<DataRow> e)
+    {
       if (InvokeRequired)
         Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsReplaced), sender, e);
-      else {
+      else
+      {
         RemoveDataRows(e.OldItems);
         AddDataRows(e.Items);
       }
     }
-    private void Rows_CollectionReset(object sender, CollectionItemsChangedEventArgs<DataRow> e) {
+    private void Rows_CollectionReset(object sender, CollectionItemsChangedEventArgs<DataRow> e)
+    {
       if (InvokeRequired)
         Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_CollectionReset), sender, e);
-      else {
+      else
+      {
         RemoveDataRows(e.OldItems);
         AddDataRows(e.Items);
@@ -415,8 +462,10 @@
     #endregion
     #region Row Event Handlers
-    private void Row_VisualPropertiesChanged(object sender, EventArgs e) {
+    private void Row_VisualPropertiesChanged(object sender, EventArgs e)
+    {
       if (InvokeRequired)
         Invoke(new EventHandler(Row_VisualPropertiesChanged), sender, e);
-      else {
+      else
+      {
         DataRow row = (DataRow)sender;
         Series series = chart.Series[row.Name];
@@ -427,8 +476,10 @@
       }
     }
-    private void Row_NameChanged(object sender, EventArgs e) {
+    private void Row_NameChanged(object sender, EventArgs e)
+    {
       if (InvokeRequired)
         Invoke(new EventHandler(Row_NameChanged), sender, e);
-      else {
+      else
+      {
         DataRow row = (DataRow)sender;
         chart.Series[row.Name].Name = row.Name;
@@ -437,13 +488,17 @@
     #endregion
     #region Values Event Handlers
-    private void Values_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) {
+    private void Values_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e)
+    {
       if (InvokeRequired)
         Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsAdded), sender, e);
-      else {
+      else
+      {
         DataRow row = null;
         valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row);
-        if (row != null) {
+        if (row != null)
+        {
           Series rowSeries = chart.Series[row.Name];
-          if (!invisibleSeries.Contains(rowSeries)) {
+          if (!invisibleSeries.Contains(rowSeries))
+          {
             rowSeries.Points.Clear();
             FillSeriesWithRowValues(rowSeries, row);
@@ -454,13 +509,17 @@
       }
     }
-    private void Values_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) {
+    private void Values_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e)
+    {
       if (InvokeRequired)
         Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsRemoved), sender, e);
-      else {
+      else
+      {
         DataRow row = null;
         valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row);
-        if (row != null) {
+        if (row != null)
+        {
           Series rowSeries = chart.Series[row.Name];
-          if (!invisibleSeries.Contains(rowSeries)) {
+          if (!invisibleSeries.Contains(rowSeries))
+          {
             rowSeries.Points.Clear();
             FillSeriesWithRowValues(rowSeries, row);
@@ -471,21 +530,30 @@
       }
     }
-    private void Values_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) {
+    private void Values_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e)
+    {
       if (InvokeRequired)
         Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsReplaced), sender, e);
-      else {
+      else
+      {
         DataRow row = null;
         valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row);
-        if (row != null) {
+        if (row != null)
+        {
           Series rowSeries = chart.Series[row.Name];
-          if (!invisibleSeries.Contains(rowSeries)) {
-            if (row.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Histogram) {
+          if (!invisibleSeries.Contains(rowSeries))
+          {
+            if (row.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Histogram)
+            {
               rowSeries.Points.Clear();
               FillSeriesWithRowValues(rowSeries, row);
-            } else {
-              foreach (IndexedItem<double> item in e.Items) {
+            }
+            else
+            {
+              foreach (IndexedItem<double> item in e.Items)
+              {
                 if (IsInvalidValue(item.Value))
                   rowSeries.Points[item.Index].IsEmpty = true;
-                else {
+                else
+                {
                   rowSeries.Points[item.Index].YValues = new double[] { item.Value };
                   rowSeries.Points[item.Index].IsEmpty = false;
@@ -499,13 +567,17 @@
       }
     }
-    private void Values_ItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) {
+    private void Values_ItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e)
+    {
       if (InvokeRequired)
         Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsMoved), sender, e);
-      else {
+      else
+      {
         DataRow row = null;
         valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row);
-        if (row != null) {
+        if (row != null)
+        {
           Series rowSeries = chart.Series[row.Name];
-          if (!invisibleSeries.Contains(rowSeries)) {
+          if (!invisibleSeries.Contains(rowSeries))
+          {
             rowSeries.Points.Clear();
             FillSeriesWithRowValues(rowSeries, row);
@@ -517,13 +589,17 @@
     }
 
-    private void Values_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) {
+    private void Values_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e)
+    {
       if (InvokeRequired)
         Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_CollectionReset), sender, e);
-      else {
+      else
+      {
         DataRow row = null;
         valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row);
-        if (row != null) {
+        if (row != null)
+        {
           Series rowSeries = chart.Series[row.Name];
-          if (!invisibleSeries.Contains(rowSeries)) {
+          if (!invisibleSeries.Contains(rowSeries))
+          {
             rowSeries.Points.Clear();
             FillSeriesWithRowValues(rowSeries, row);
@@ -538,11 +614,14 @@
 
     #region Chart Event Handlers
-    private void chart_MouseDown(object sender, MouseEventArgs e) {
+    private void chart_MouseDown(object sender, MouseEventArgs e)
+    {
       HitTestResult result = chart.HitTest(e.X, e.Y);
-      if (result.ChartElementType == ChartElementType.LegendItem) {
+      if (result.ChartElementType == ChartElementType.LegendItem)
+      {
         ToggleSeriesVisible(result.Series);
       }
     }
-    private void chart_MouseMove(object sender, MouseEventArgs e) {
+    private void chart_MouseMove(object sender, MouseEventArgs e)
+    {
       HitTestResult result = chart.HitTest(e.X, e.Y);
       if (result.ChartElementType == ChartElementType.LegendItem)
@@ -551,10 +630,14 @@
         this.Cursor = Cursors.Default;
     }
-    private void chart_CustomizeLegend(object sender, CustomizeLegendEventArgs e) {
-      foreach (LegendItem legendItem in e.LegendItems) {
+    private void chart_CustomizeLegend(object sender, CustomizeLegendEventArgs e)
+    {
+      foreach (LegendItem legendItem in e.LegendItems)
+      {
         var series = chart.Series[legendItem.SeriesName];
-        if (series != null) {
+        if (series != null)
+        {
           bool seriesIsInvisible = invisibleSeries.Contains(series);
-          foreach (LegendCell cell in legendItem.Cells) {
+          foreach (LegendCell cell in legendItem.Cells)
+          {
             cell.ForeColor = seriesIsInvisible ? Color.Gray : Color.Black;
           }
@@ -564,11 +647,16 @@
     #endregion
 
-    private void ToggleSeriesVisible(Series series) {
-      if (!invisibleSeries.Contains(series)) {
+    private void ToggleSeriesVisible(Series series)
+    {
+      if (!invisibleSeries.Contains(series))
+      {
         series.Points.Clear();
         invisibleSeries.Add(series);
-      } else {
+      }
+      else
+      {
         invisibleSeries.Remove(series);
-        if (Content != null) {
+        if (Content != null)
+        {
 
           var row = (from r in Content.Rows
@@ -583,10 +671,13 @@
     }
 
-    private void FillSeriesWithRowValues(Series series, DataRow row) {
-      switch (row.VisualProperties.ChartType) {
+    private void FillSeriesWithRowValues(Series series, DataRow row)
+    {
+      switch (row.VisualProperties.ChartType)
+      {
         case DataRowVisualProperties.DataRowChartType.Histogram:
           CalculateHistogram(series, row);
           break;
-        default: {
+        default:
+          {
             bool yLogarithmic = series.YAxisType == AxisType.Primary
                                   ? Content.VisualProperties.YAxisLogScale
@@ -595,5 +686,6 @@
                                   ? Content.VisualProperties.XAxisLogScale
                                   : Content.VisualProperties.SecondXAxisLogScale;
-            for (int i = 0; i < row.Values.Count; i++) {
+            for (int i = 0; i < row.Values.Count; i++)
+            {
               var value = row.Values[i];
               var point = new DataPoint();
@@ -614,5 +706,6 @@
       double min = Double.MaxValue;
 
-      foreach (double value in values) {
+      foreach (double value in values)
+      {
         if (!Double.IsNaN(value) && value < min)
           min = value;
@@ -622,8 +715,10 @@
 
     //get maximium ignores nan values
-    private double GetMaximum(IEnumerable<double> values) {
+    private double GetMaximum(IEnumerable<double> values)
+    {
       double max = Double.MinValue;
 
-      foreach (double value in values) {
+      foreach (double value in values)
+      {
         if (!Double.IsNaN(value) && value > max)
           max = value;
@@ -632,6 +727,35 @@
     }
 
-    protected virtual void CalculateHistogram(Series series, DataRow row) {
-      series.Points.Clear();
+    protected virtual void CalculateHistogram(Series series, DataRow row)
+    {
+      if (classification != null)
+      {
+
+        var qry = row.Values.Select((i, index) => new { i, j = classification[index] })
+                           .GroupBy((x) => x.j).ToDictionary(x => x.Key, x => x.Select(v => v.i).ToList());
+        chart.Titles.Add(row.Name);
+        foreach (KeyValuePair<double, List<double>> entry in qry)
+        {
+          var s = new Series(row.Name + entry.Key);
+
+          ConfigureSeries(s, row);
+          AddPointsToHistogramSeries(s, row, entry.Value);
+
+          s.LegendText = entry.Key.ToString();
+
+          chart.Series.Add(s);
+        }
+      }
+      else
+      {
+        series.Points.Clear();
+        ConfigureSeries(series, row);
+        AddPointsToHistogramSeries(series, row, null);
+      }
+    }
+
+    private void AddPointsToHistogramSeries(Series series, DataRow row, List<double> values)
+    {
+
       if (!row.Values.Any()) return;
       int bins = row.VisualProperties.Bins;
@@ -641,5 +765,6 @@
       double intervalWidth = (maxValue - minValue) / bins;
       if (intervalWidth < 0) return;
-      if (intervalWidth == 0) {
+      if (intervalWidth == 0)
+      {
         series.Points.AddXY(minValue, row.Values.Count);
         return;
@@ -673,6 +798,11 @@
       var doubleRange = DoubleRange(min, max, intervalWidth).Skip(1).ToList();
 
+
+      if (values == null) {
+        values = row.Values.ToList(); ;
+      }
+
       // aggregate the row values by unique key and frequency value
-      var valueFrequencies = (from v in row.Values
+      var valueFrequencies = (from v in values
                               where !IsInvalidValue(v)
                               orderby v
@@ -680,14 +810,18 @@
                               select new Tuple<double, double>(g.First(), g.Count())).ToList();
 
-      // shift the chart to the left so the bars are placed on the intervals
-      if (valueFrequencies.First().Item1 < doubleRange.First())
+      //  shift the chart to the left so the bars are placed on the intervals
+      if (classification != null || valueFrequencies.First().Item1 < doubleRange.First()) {
         series.Points.Add(new DataPoint(min - intervalWidth, 0));
+        series.Points.Add(new DataPoint(max + intervalWidth, 0));
+      }
 
       // add data points
       int j = 0;
-      foreach (var d in doubleRange) {
+      foreach (var d in doubleRange)
+      {
         double sum = 0.0;
         // sum the frequency values that fall within the same interval
-        while (j < valueFrequencies.Count && valueFrequencies[j].Item1 < d) {
+        while (j < valueFrequencies.Count && valueFrequencies[j].Item1 < d)
+        {
           sum += valueFrequencies[j].Item2;
           ++j;
@@ -699,5 +833,6 @@
                               ? "Y"
                               : Content.VisualProperties.YAxisTitle;
-        series.Points.Add(new DataPoint(d - intervalCenter, sum) {
+        series.Points.Add(new DataPoint(d - intervalCenter, sum)
+        {
           ToolTip =
             xAxisTitle + ": [" + (d - intervalWidth) + "-" + d + ")" + Environment.NewLine +
@@ -708,5 +843,6 @@
 
     #region Helpers
-    public static IEnumerable<double> DoubleRange(double min, double max, double step) {
+    public static IEnumerable<double> DoubleRange(double min, double max, double step)
+    {
       double i;
       for (i = min; i <= max; i += step)
@@ -717,9 +853,11 @@
     }
 
-    protected void RemoveCustomPropertyIfExists(Series series, string property) {
+    protected void RemoveCustomPropertyIfExists(Series series, string property)
+    {
       if (series.IsCustomPropertySet(property)) series.DeleteCustomProperty(property);
     }
 
-    private double HumanRoundRange(double range) {
+    private double HumanRoundRange(double range)
+    {
       double base10 = Math.Pow(10.0, Math.Floor(Math.Log10(range)));
       double rounding = range / base10;
@@ -732,5 +870,6 @@
     }
 
-    private double HumanRoundMax(double max) {
+    private double HumanRoundMax(double max)
+    {
       double base10;
       if (max > 0) base10 = Math.Pow(10.0, Math.Floor(Math.Log10(max)));
@@ -741,6 +880,8 @@
     }
 
-    private ChartDashStyle ConvertLineStyle(DataRowVisualProperties.DataRowLineStyle dataRowLineStyle) {
-      switch (dataRowLineStyle) {
+    private ChartDashStyle ConvertLineStyle(DataRowVisualProperties.DataRowLineStyle dataRowLineStyle)
+    {
+      switch (dataRowLineStyle)
+      {
         case DataRowVisualProperties.DataRowLineStyle.Dash:
           return ChartDashStyle.Dash;
@@ -760,5 +901,6 @@
     }
 
-    protected static bool IsInvalidValue(double x) {
+    protected static bool IsInvalidValue(double x)
+    {
       return double.IsNaN(x) || x < (double)decimal.MinValue || x > (double)decimal.MaxValue;
     }
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs	(revision 10866)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs	(revision 10867)
@@ -22,4 +22,5 @@
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using System.Drawing;
 using HeuristicLab.Analysis;
@@ -68,7 +69,9 @@
     }
 
+    public List<double> GetVariableValues(string variableName) {
+      return preprocessingData.GetValues<double>(preprocessingData.GetColumnIndex(variableName)).ToList();
+    }
 
-
-    private IEnumerable<string> GetVariableNames() {
+    public IEnumerable<string> GetVariableNames() {
       List<string> doubleVariableNames = new List<string>();
 
@@ -118,5 +121,5 @@
         if(row != null)
           dataRows.Add(row);
-      }
+  }
       return dataRows;
     }
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IChartLogic.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IChartLogic.cs	(revision 10866)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IChartLogic.cs	(revision 10867)
@@ -46,4 +46,7 @@
 
     string GetVariableNameByIndex(int index);
+
+    IEnumerable<string> GetVariableNames();
+    List<double> GetVariableValues(string variableName);
   }
 }
