Index: /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/GaussianProcessRegressionSolutionIteractiveRangeEstimatorView.Designer.cs
===================================================================
--- /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/GaussianProcessRegressionSolutionIteractiveRangeEstimatorView.Designer.cs	(revision 13812)
+++ /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/GaussianProcessRegressionSolutionIteractiveRangeEstimatorView.Designer.cs	(revision 13812)
@@ -0,0 +1,156 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Algorithms.DataAnalysis.Views {
+  partial class GaussianProcessRegressionSolutionIteractiveRangeEstimatorView {
+    /// <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 Component 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.components = new System.ComponentModel.Container();
+      System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+      System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+      this.chart = new HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart();
+      this.splitContainer = new System.Windows.Forms.SplitContainer();
+      this.configurationGroupBox = new System.Windows.Forms.GroupBox();
+      this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
+      this.splitContainer.Panel1.SuspendLayout();
+      this.splitContainer.Panel2.SuspendLayout();
+      this.splitContainer.SuspendLayout();
+      this.configurationGroupBox.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // chart
+      // 
+      chartArea1.Name = "ChartArea";
+      this.chart.ChartAreas.Add(chartArea1);
+      this.chart.Dock = System.Windows.Forms.DockStyle.Fill;
+      legend1.Alignment = System.Drawing.StringAlignment.Center;
+      legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top;
+      legend1.Name = "Default";
+      this.chart.Legends.Add(legend1);
+      this.chart.Location = new System.Drawing.Point(0, 0);
+      this.chart.Name = "chart";
+      this.chart.Palette = System.Windows.Forms.DataVisualization.Charting.ChartColorPalette.None;
+      this.chart.PaletteCustomColors = new System.Drawing.Color[] {
+        System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(180)))), ((int)(((byte)(65))))),
+        System.Drawing.Color.FromArgb(((int)(((byte)(65)))), ((int)(((byte)(140)))), ((int)(((byte)(240))))),
+        System.Drawing.Color.FromArgb(((int)(((byte)(223)))), ((int)(((byte)(58)))), ((int)(((byte)(2)))))};
+      this.chart.Size = new System.Drawing.Size(715, 376);
+      this.chart.TabIndex = 0;
+      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.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chart_MouseDown);
+      this.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.chart_MouseMove);
+      // 
+      // splitContainer
+      // 
+      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.splitContainer.Location = new System.Drawing.Point(0, 0);
+      this.splitContainer.Name = "splitContainer";
+      this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
+      // 
+      // splitContainer.Panel1
+      // 
+      this.splitContainer.Panel1.Controls.Add(this.chart);
+      // 
+      // splitContainer.Panel2
+      // 
+      this.splitContainer.Panel2.Controls.Add(this.configurationGroupBox);
+      this.splitContainer.Size = new System.Drawing.Size(715, 591);
+      this.splitContainer.SplitterDistance = 376;
+      this.splitContainer.TabIndex = 1;
+      // 
+      // configurationGroupBox
+      // 
+      this.configurationGroupBox.Controls.Add(this.tableLayoutPanel);
+      this.configurationGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.configurationGroupBox.Location = new System.Drawing.Point(0, 0);
+      this.configurationGroupBox.Name = "configurationGroupBox";
+      this.configurationGroupBox.Size = new System.Drawing.Size(715, 211);
+      this.configurationGroupBox.TabIndex = 1;
+      this.configurationGroupBox.TabStop = false;
+      this.configurationGroupBox.Text = "Configuration";
+      // 
+      // tableLayoutPanel
+      // 
+      this.tableLayoutPanel.AutoSize = true;
+      this.tableLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+      this.tableLayoutPanel.ColumnCount = 3;
+      this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F));
+      this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
+      this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 150F));
+      this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.tableLayoutPanel.Location = new System.Drawing.Point(3, 16);
+      this.tableLayoutPanel.Name = "tableLayoutPanel";
+      this.tableLayoutPanel.RowCount = 1;
+      this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());
+      this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
+      this.tableLayoutPanel.Size = new System.Drawing.Size(709, 192);
+      this.tableLayoutPanel.TabIndex = 0;
+      // 
+      // GaussianProcessRegressionSolutionRangeEstimatorView
+      // 
+      this.AllowDrop = true;
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.splitContainer);
+      this.Name = "GaussianProcessRegressionSolutionRangeEstimatorView";
+      this.Size = new System.Drawing.Size(715, 591);
+      ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit();
+      this.splitContainer.Panel1.ResumeLayout(false);
+      this.splitContainer.Panel2.ResumeLayout(false);
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
+      this.splitContainer.ResumeLayout(false);
+      this.configurationGroupBox.ResumeLayout(false);
+      this.configurationGroupBox.PerformLayout();
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private HeuristicLab.Visualization.ChartControlsExtensions.EnhancedChart chart;
+    private System.Windows.Forms.SplitContainer splitContainer;
+    private System.Windows.Forms.GroupBox configurationGroupBox;
+    private System.Windows.Forms.TableLayoutPanel tableLayoutPanel;
+  }
+}
Index: /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/GaussianProcessRegressionSolutionIteractiveRangeEstimatorView.cs
===================================================================
--- /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/GaussianProcessRegressionSolutionIteractiveRangeEstimatorView.cs	(revision 13812)
+++ /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/GaussianProcessRegressionSolutionIteractiveRangeEstimatorView.cs	(revision 13812)
@@ -0,0 +1,327 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Globalization;
+using System.Linq;
+using System.Windows.Forms;
+using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.Data;
+using HeuristicLab.Data.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis.Views;
+using HeuristicLab.Visualization.ChartControlsExtensions;
+
+namespace HeuristicLab.Algorithms.DataAnalysis.Views {
+  [View("Interactive Estimator")]
+  [Content(typeof(GaussianProcessRegressionSolution))]
+  public partial class GaussianProcessRegressionSolutionIteractiveRangeEstimatorView : DataAnalysisSolutionEvaluationView {
+    const int TrackBarSteps = 1000;
+    const int DrawingSteps = 1000;
+
+    private const string EstimatedMeanSeriesName = "Estimated Mean";
+    private const string EstimatedVarianceSeriesName = "95% Conficence Interval";
+
+    private static readonly string LabelFormatString = "{0}:" + Environment.NewLine + "{1}";
+
+    private List<string> variableNames;
+    private List<DoubleRange> ranges;
+    private List<RadioButton> radioButtons;
+    private List<TrackBar> trackBars;
+
+
+    private int ActiveDimension {
+      get { return radioButtons.FindIndex(rb => rb.Checked); }
+    }
+
+    public new GaussianProcessRegressionSolution Content {
+      get { return (GaussianProcessRegressionSolution)base.Content; }
+      set { base.Content = value; }
+    }
+    public GaussianProcessRegressionSolutionIteractiveRangeEstimatorView()
+        : base() {
+      variableNames = new List<string>();
+      ranges = new List<DoubleRange>();
+      radioButtons = new List<RadioButton>();
+      trackBars = new List<TrackBar>();
+
+      InitializeComponent();
+      tableLayoutPanel.HorizontalScroll.Maximum = 0;
+      tableLayoutPanel.AutoScroll = false;
+      tableLayoutPanel.HorizontalScroll.Visible = false;
+      tableLayoutPanel.AutoScroll = true;
+
+      //configure axis
+      chart.CustomizeAllChartAreas();
+      chart.ChartAreas[0].CursorX.IsUserSelectionEnabled = true;
+      chart.ChartAreas[0].AxisX.ScaleView.Zoomable = true;
+      chart.ChartAreas[0].CursorX.Interval = 1;
+
+      chart.ChartAreas[0].CursorY.IsUserSelectionEnabled = true;
+      chart.ChartAreas[0].AxisY.ScaleView.Zoomable = true;
+      chart.ChartAreas[0].CursorY.Interval = 0;
+    }
+
+    private void RedrawChart() {
+      chart.Series.Clear();
+      chart.ChartAreas[0].AxisX.StripLines.Clear();
+      if (Content == null) return;
+
+      double minX = ranges[ActiveDimension].Start;
+      double maxX = ranges[ActiveDimension].End;
+      decimal stepSize = (decimal)((maxX - minX) / DrawingSteps);
+
+      //double axisMin, axisMax, axisInterval;
+      //ChartUtil.CalculateAxisInterval(minX, maxX, 10, out axisMin, out axisMax, out axisInterval);
+      //decimal axisStepsSize = (decimal)((maxX - minX) / DrawingSteps);
+
+      // Build dataset
+      var activeXs = Enumerable.Range(0, DrawingSteps).Select(i => (decimal)minX + i * stepSize).ToList();
+      var fixedXs = trackBars.Zip(ranges, (t, r) => (decimal)r.Start + ((decimal)r.End - (decimal)r.Start)/TrackBarSteps*t.Value).ToList();
+      var values = new double[DrawingSteps, variableNames.Count];
+      for (int r = 0; r < DrawingSteps; r++) {
+        for (int c = 0; c < variableNames.Count; c++) {
+          values[r, c] = (double)(c == ActiveDimension ? activeXs[r] : fixedXs[c]);
+        }
+      }
+      var dataset = new Dataset(variableNames, values);
+
+      // Estimations
+      var model = Content.Model;
+      var means = model.GetEstimatedValues(dataset, Enumerable.Range(0, DrawingSteps)).ToList();
+      var variances = model.GetEstimatedVariance(dataset, Enumerable.Range(0, DrawingSteps)).ToList();
+
+      // Charting config
+      chart.ChartAreas[0].AxisX.Minimum = minX;
+      chart.ChartAreas[0].AxisX.Maximum = maxX;
+      chart.ChartAreas[0].AxisX.Interval = (maxX - minX) / 10;
+
+      chart.Series.Add(EstimatedVarianceSeriesName);
+      chart.Series[EstimatedVarianceSeriesName].LegendText = EstimatedVarianceSeriesName;
+      chart.Series[EstimatedVarianceSeriesName].ChartType = SeriesChartType.Range;
+      chart.Series[EstimatedVarianceSeriesName].EmptyPointStyle.Color = chart.Series[EstimatedVarianceSeriesName].Color;
+
+      chart.Series.Add(EstimatedMeanSeriesName);
+      chart.Series[EstimatedMeanSeriesName].LegendText = EstimatedMeanSeriesName;
+      chart.Series[EstimatedMeanSeriesName].ChartType = SeriesChartType.FastLine;
+
+      // Charting databind
+      var lower = means.Zip(variances, GetLowerConfBound).ToList();
+      var upper = means.Zip(variances, GetUpperConfBound).ToList();
+      chart.Series[EstimatedVarianceSeriesName].Points.DataBindXY(activeXs, lower, upper);
+      //InsertEmptyPoints(chart.Series[EstimatedVarianceSeriesName]);
+
+      chart.Series[EstimatedMeanSeriesName].Points.DataBindXY(activeXs, means);
+      //InsertEmptyPoints(chart.Series[EstimatedMeanSeriesName]);
+
+      // Update StripLines
+      var trainingValues = Content.ProblemData.Dataset.GetDoubleValues(variableNames[ActiveDimension], Content.ProblemData.TrainingIndices);
+      var trainingRange = new DoubleRange(trainingValues.Min(), trainingValues.Max());
+      if (minX < trainingRange.Start)
+        CreateAndAddStripLine(minX, trainingRange.Start, Color.FromArgb(40, 223, 58, 2), Color.Transparent);
+      if (maxX > trainingRange.End)
+        CreateAndAddStripLine(trainingRange.End, maxX, Color.FromArgb(40, 223, 58, 2), Color.Transparent);
+    }
+
+    private void CreateAndAddStripLine(double start, double end, Color color, Color secondColor) {
+      StripLine stripLine = new StripLine {
+        BackColor = color,
+        BackSecondaryColor = secondColor,
+        StripWidth = end - start,
+        IntervalOffset = start
+      };
+      chart.ChartAreas[0].AxisX.StripLines.Add(stripLine);
+    }
+
+    private void UpdateConfigurationControls() {
+      tableLayoutPanel.SuspendRepaint();
+      tableLayoutPanel.SuspendLayout();
+
+      tableLayoutPanel.RowCount = 0;
+      tableLayoutPanel.Controls.Clear();
+
+      variableNames.Clear();
+      ranges.Clear();
+      radioButtons.Clear();
+      trackBars.Clear();
+
+
+      if (Content == null) {
+        tableLayoutPanel.ResumeLayout(true);
+        tableLayoutPanel.ResumeRepaint(true);
+        return;
+      }
+
+      variableNames.AddRange(Content.ProblemData.AllowedInputVariables);
+      for (int i = 0; i < variableNames.Count; i++) {
+        var values = Content.ProblemData.Dataset.GetDoubleValues(variableNames[i], Content.ProblemData.AllIndices);
+        double min, max, interval;
+        ChartUtil.CalculateAxisInterval(values.Min(), values.Max(), 10, out min, out max, out interval);
+        ranges.Add(new DoubleRange(min, max));
+      }
+
+      tableLayoutPanel.RowCount = variableNames.Count;
+      while (tableLayoutPanel.RowStyles.Count < variableNames.Count)
+        tableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.AutoSize));
+
+      for (int i = 0; i < variableNames.Count; i++) {
+        var radioButton = new RadioButton {
+          Text =  string.Format(LabelFormatString, variableNames[i], ranges[i].Start + (ranges[i].End - ranges[i].Start) / 2),
+          Checked = i == 0,
+          Anchor = AnchorStyles.Top | AnchorStyles.Left,
+          AutoSize = true,
+        };
+        radioButton.CheckedChanged += radioButton_CheckedChanged;
+        var trackBar = new TrackBar {
+          Minimum = 0,
+          Maximum = TrackBarSteps,
+          Value = TrackBarSteps / 2,
+          TickFrequency = TrackBarSteps / 10,
+          LargeChange = TrackBarSteps / 10,
+          Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right,
+          Enabled = i != 0
+        };
+        trackBar.ValueChanged += trackBar_ValueChanged;
+        var rangeView = new DoubleRangeView {
+          Content = ranges[i],
+          Anchor = AnchorStyles.Top | AnchorStyles.Right,
+        };
+        rangeView.Content.ValueChanged += rangeView_ValueChanged;
+
+        tableLayoutPanel.RowStyles[i].SizeType = SizeType.AutoSize;
+        tableLayoutPanel.Controls.Add(radioButton, 0, i);
+        tableLayoutPanel.Controls.Add(trackBar, 1, i);
+        tableLayoutPanel.Controls.Add(rangeView, 2, i);
+
+        radioButtons.Add(radioButton);
+        trackBars.Add(trackBar);
+      }
+
+      tableLayoutPanel.ResumeLayout(true);
+      tableLayoutPanel.ResumeRepaint(true);
+    }
+
+    private void UpdateCurrentValueLabel(int dim = -1) {
+      if (dim < 0) {
+        for (int i = 0; i < radioButtons.Count; i++) {
+          decimal value = (decimal)ranges[i].Start + ((decimal)ranges[i].End - (decimal)ranges[i].Start) / TrackBarSteps * trackBars[i].Value;
+          radioButtons[i].Text = Text = string.Format(LabelFormatString, variableNames[i], i == ActiveDimension ? "<Plotted>" : value.ToString(CultureInfo.InvariantCulture));
+        }
+      } else {
+        decimal value = (decimal)ranges[dim].Start + ((decimal)ranges[dim].End - (decimal)ranges[dim].Start)  /TrackBarSteps * trackBars[dim].Value;
+        radioButtons[dim].Text = Text = string.Format(LabelFormatString, variableNames[dim], dim == ActiveDimension ? "<Plotted>" : value.ToString(CultureInfo.InvariantCulture));
+      }
+    }
+
+    private void radioButton_CheckedChanged(object sender, EventArgs e) {
+      var radioButton = sender as RadioButton;
+      if (radioButton == null || !radioButton.Checked) return;
+
+      int index = radioButtons.IndexOf(radioButton);
+
+      var inputVariables = Content.ProblemData.AllowedInputVariables.ToList();
+      for (int i = 0; i < inputVariables.Count; i++) {
+        radioButtons[i].Checked = i == index;
+        trackBars[i].Enabled = i != index;
+      }
+
+      UpdateCurrentValueLabel();
+      RedrawChart();
+    }
+    private void trackBar_ValueChanged(object sender, EventArgs e) {
+      UpdateCurrentValueLabel(trackBars.FindIndex(t => t == sender));
+      RedrawChart();
+    }
+    private void rangeView_ValueChanged(object sender, EventArgs e) {
+      UpdateCurrentValueLabel(ranges.FindIndex(r => r == sender));
+      RedrawChart();
+    }
+
+    #region Events
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ModelChanged += new EventHandler(Content_ModelChanged);
+      Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
+    }
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ModelChanged -= new EventHandler(Content_ModelChanged);
+      Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      UpdateConfigurationControls();
+      RedrawChart();
+    }
+    private void Content_ModelChanged(object sender, EventArgs e) {
+      RedrawChart();
+    }
+    private void Content_ProblemDataChanged(object sender, EventArgs e) {
+      UpdateConfigurationControls();
+      RedrawChart();
+    }
+
+    private void Chart_MouseDoubleClick(object sender, MouseEventArgs e) {
+      var result = chart.HitTest(e.X, e.Y);
+      if (true || result.ChartArea != null && (result.ChartElementType == ChartElementType.PlottingArea ||
+                                       result.ChartElementType == ChartElementType.Gridlines) ||
+                                       result.ChartElementType == ChartElementType.StripLines) {
+        foreach (var axis in result.ChartArea.Axes)
+          axis.ScaleView.ZoomReset(int.MaxValue);
+      }
+    }
+    private void chart_MouseMove(object sender, MouseEventArgs e) {
+      //HitTestResult result = chart.HitTest(e.X, e.Y);
+      //if (result.ChartElementType == ChartElementType.LegendItem && result.Series.Name != TARGETVARIABLE_SERIES_NAME)
+      //  Cursor = Cursors.Hand;
+      //else
+      //  Cursor = Cursors.Default;
+    }
+    private void chart_MouseDown(object sender, MouseEventArgs e) {
+      //HitTestResult result = chart.HitTest(e.X, e.Y);
+      //if (result.ChartElementType == ChartElementType.LegendItem && result.Series.Name != TARGETVARIABLE_SERIES_NAME) {
+      //  ToggleSeriesData(result.Series);
+      //}
+    }
+    private void chart_CustomizeLegend(object sender, CustomizeLegendEventArgs e) {
+      //if (chart.Series.Count != 4) return;
+      //e.LegendItems[0].Cells[1].ForeColor = this.chart.Series[EstimatedMeanSeriesName].Points.Count == 0 ? Color.Gray : Color.Black;
+      //e.LegendItems[1].Cells[1].ForeColor = this.chart.Series[ESTIMATEDVALUES_TEST_SERIES_NAME].Points.Count == 0 ? Color.Gray : Color.Black;
+      //e.LegendItems[2].Cells[1].ForeColor = this.chart.Series[ESTIMATEDVALUES_ALL_SERIES_NAME].Points.Count == 0 ? Color.Gray : Color.Black;
+      //e.LegendItems[3].Cells[1].ForeColor = this.chart.Series[TARGETVARIABLE_SERIES_NAME].Points.Count == 0 ? Color.Gray : Color.Black;
+    }
+    #endregion
+
+    #region Helper
+    private double GetLowerConfBound(double m, double s2) {
+      return m - 1.96 * Math.Sqrt(s2);
+    }
+    private double GetUpperConfBound(double m, double s2) {
+      return m + 1.96 * Math.Sqrt(s2);
+    }
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/HeuristicLab.Algorithms.DataAnalysis.Views-3.4.csproj
===================================================================
--- /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/HeuristicLab.Algorithms.DataAnalysis.Views-3.4.csproj	(revision 13811)
+++ /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/HeuristicLab.Algorithms.DataAnalysis.Views-3.4.csproj	(revision 13812)
@@ -249,4 +249,10 @@
     <Compile Include="GaussianProcessRegressionSolutionLineChartView.Designer.cs">
       <DependentUpon>GaussianProcessRegressionSolutionLineChartView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="GaussianProcessRegressionSolutionIteractiveRangeEstimatorView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="GaussianProcessRegressionSolutionIteractiveRangeEstimatorView.Designer.cs">
+      <DependentUpon>GaussianProcessRegressionSolutionIteractiveRangeEstimatorView.cs</DependentUpon>
     </Compile>
     <Compile Include="SupportVectorMachineModelSupportVectorsView.cs">
