Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.Designer.cs	(revision 7700)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.Designer.cs	(revision 7701)
@@ -49,8 +49,6 @@
       this.chart.TabIndex = 0;
       this.chart.Text = "chart";
-      this.chart.CustomizeLegend += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs>(this.chart_CustomizeLegend);
       this.chart.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.Chart_MouseDoubleClick);
       this.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart_MouseMove);
-      this.chart.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDown);
       // 
       // label1
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs	(revision 7700)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs	(revision 7701)
@@ -22,5 +22,4 @@
 using System;
 using System.Collections.Generic;
-using System.Drawing;
 using System.Linq;
 using System.Windows.Forms;
@@ -28,4 +27,5 @@
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
+
 namespace HeuristicLab.Problems.DataAnalysis.Views {
   [View("Error Characteristics Curve")]
@@ -37,6 +37,4 @@
     protected const string AllSamples = "All Samples";
 
-    protected Dictionary<string, List<double>> seriesResiduals = new Dictionary<string, List<double>>();
-
     public RegressionSolutionErrorCharacteristicsCurveView()
       : base() {
@@ -102,5 +100,4 @@
     protected virtual void UpdateChart() {
       chart.Series.Clear();
-      seriesResiduals.Clear();
       chart.Annotations.Clear();
       if (Content == null) return;
@@ -117,5 +114,4 @@
       Series baselineSeries = new Series("Baseline");
       baselineSeries.ChartType = SeriesChartType.FastLine;
-      seriesResiduals[baselineSeries.Name] = baselineResiduals;
       UpdateSeries(baselineResiduals, baselineSeries);
       baselineSeries.ToolTip = "Area over Curve: " + CalculateAreaOverCurve(baselineSeries);
@@ -133,5 +129,4 @@
       solutionSeries.ChartType = SeriesChartType.FastLine;
       var estimatedValues = GetResiduals(GetOriginalValues(), GetEstimatedValues(solution));
-      seriesResiduals[solutionSeries.Name] = estimatedValues;
       UpdateSeries(estimatedValues, solutionSeries);
       solutionSeries.ToolTip = "Area over Curve: " + CalculateAreaOverCurve(solutionSeries);
@@ -235,12 +230,20 @@
     }
 
-    #region events
+    #region Baseline
     private void Chart_MouseDoubleClick(object sender, MouseEventArgs e) {
       HitTestResult result = chart.HitTest(e.X, e.Y);
       if (result.ChartElementType != ChartElementType.LegendItem) return;
-      if (result.Series.Name != constantModel.Name) return;
 
       MainFormManager.MainForm.ShowContent((IRegressionSolution)result.Series.Tag);
     }
+
+    private IRegressionSolution CreateConstantModel() {
+      double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).Average();
+      var solution = new ConstantRegressionModel(averageTrainingTarget).CreateRegressionSolution(ProblemData);
+      solution.Name = "Baseline";
+      return solution;
+    }
+    #endregion
+
     private void chart_MouseMove(object sender, MouseEventArgs e) {
       HitTestResult result = chart.HitTest(e.X, e.Y);
@@ -250,46 +253,4 @@
         Cursor = Cursors.Default;
     }
-    private void chart_MouseDown(object sender, MouseEventArgs e) {
-      HitTestResult result = chart.HitTest(e.X, e.Y);
-      if (result.ChartElementType == ChartElementType.LegendItem) {
-        ToggleSeriesData(result.Series);
-      }
-    }
-    private void chart_CustomizeLegend(object sender, CustomizeLegendEventArgs e) {
-      foreach (LegendItem legend in e.LegendItems) {
-        legend.Cells[1].ForeColor = this.chart.Series[legend.SeriesName].Points.Count == 0 ? Color.Gray : Color.Black;
-      }
-    }
-    #endregion
-
-    private IRegressionSolution CreateConstantModel() {
-      double averageTrainingTarget = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).Average();
-      var solution = new ConstantRegressionModel(averageTrainingTarget).CreateRegressionSolution(ProblemData);
-      solution.Name = "Baseline";
-      return solution;
-    }
-
-    private void ToggleSeriesData(Series series) {
-      if (series.Points.Count > 0) {  //checks if series is shown
-        if (this.chart.Series.Any(s => s != series && s.Points.Count > 0)) {
-          ClearPointsQuick(series.Points);
-        }
-      } else if (Content != null) {
-        List<double> residuals;
-        if (seriesResiduals.TryGetValue(series.Name, out residuals)) {
-          UpdateSeries(residuals, series);
-          chart.Legends[series.Legend].ForeColor = Color.Black;
-          chart.Refresh();
-        }
-      }
-    }
-
-    // workaround as per http://stackoverflow.com/questions/5744930/datapointcollection-clear-performance
-    private static void ClearPointsQuick(DataPointCollection points) {
-      points.SuspendUpdates();
-      while (points.Count > 0)
-        points.RemoveAt(points.Count - 1);
-      points.ResumeUpdates();
-    }
   }
 }
