Index: /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/GradientChart.Designer.cs
===================================================================
--- /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/GradientChart.Designer.cs	(revision 14088)
+++ /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/GradientChart.Designer.cs	(revision 14089)
@@ -88,4 +88,5 @@
       this.chart.Size = new System.Drawing.Size(453, 308);
       this.chart.TabIndex = 0;
+      this.chart.SelectionRangeChanged += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.CursorEventArgs>(this.chart_SelectionRangeChanged);
       this.chart.AnnotationPositionChanging += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.AnnotationPositionChangingEventArgs>(this.chart_AnnotationPositionChanging);
       this.chart.DragDrop += new System.Windows.Forms.DragEventHandler(this.chart_DragDrop);
Index: /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/GradientChart.cs
===================================================================
--- /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/GradientChart.cs	(revision 14088)
+++ /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/GradientChart.cs	(revision 14089)
@@ -194,4 +194,8 @@
     }
 
+    public bool IsZoomed {
+      get { return chart.ChartAreas[0].AxisX.ScaleView.IsZoomed; }
+    }
+
     private VerticalLineAnnotation VerticalLineAnnotation {
       get { return (VerticalLineAnnotation)chart.Annotations.SingleOrDefault(x => x is VerticalLineAnnotation); }
@@ -585,4 +589,11 @@
     }
 
+    public event EventHandler ZoomChanged;
+    public void OnZoomChanged(object sender, EventArgs args) {
+      var changed = ZoomChanged;
+      if (changed == null) return;
+      changed(sender, args);
+    }
+
     private void sharedFixedVariables_ItemChanged(object o, EventArgs<int, int> e) {
       if (o != sharedFixedVariables) return;
@@ -652,4 +663,8 @@
       configurationDialog.ShowDialog(this);
     }
+
+    private void chart_SelectionRangeChanged(object sender, CursorEventArgs e) {
+      OnZoomChanged(this, EventArgs.Empty);
+    }
     #endregion
   }
Index: /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionTargetResponseGradientView.Designer.cs
===================================================================
--- /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionTargetResponseGradientView.Designer.cs	(revision 14088)
+++ /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionTargetResponseGradientView.Designer.cs	(revision 14089)
@@ -31,5 +31,4 @@
       this.automaticYAxisCheckBox = new System.Windows.Forms.CheckBox();
       this.densityGroupBox = new System.Windows.Forms.GroupBox();
-      this.columnsTextBox = new System.Windows.Forms.TextBox();
       this.columnsLabel = new System.Windows.Forms.Label();
       this.densityComboBox = new System.Windows.Forms.ComboBox();
@@ -39,4 +38,5 @@
       this.scrollPanel = new System.Windows.Forms.Panel();
       this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
+      this.columnsNumericUpDown = new System.Windows.Forms.NumericUpDown();
       this.yAxisConfigGroupBox.SuspendLayout();
       this.densityGroupBox.SuspendLayout();
@@ -48,4 +48,5 @@
       this.scrollPanel.SuspendLayout();
       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.columnsNumericUpDown)).BeginInit();
       this.SuspendLayout();
       // 
@@ -114,5 +115,5 @@
       // densityGroupBox
       // 
-      this.densityGroupBox.Controls.Add(this.columnsTextBox);
+      this.densityGroupBox.Controls.Add(this.columnsNumericUpDown);
       this.densityGroupBox.Controls.Add(this.columnsLabel);
       this.densityGroupBox.Controls.Add(this.densityComboBox);
@@ -125,15 +126,4 @@
       this.densityGroupBox.TabStop = false;
       this.densityGroupBox.Text = "Settings";
-      // 
-      // columnsTextBox
-      // 
-      this.columnsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-      this.columnsTextBox.Location = new System.Drawing.Point(66, 46);
-      this.columnsTextBox.Name = "columnsTextBox";
-      this.columnsTextBox.Size = new System.Drawing.Size(94, 20);
-      this.columnsTextBox.TabIndex = 1;
-      this.columnsTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.columnsTextBox_Validating);
-      this.columnsTextBox.Validated += new System.EventHandler(this.columnsTextBox_Validated);
       // 
       // columnsLabel
@@ -217,4 +207,24 @@
       this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
       this.errorProvider.ContainerControl = this;
+      // 
+      // columnsNumericUpDown
+      // 
+      this.columnsNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.columnsNumericUpDown.Location = new System.Drawing.Point(66, 46);
+      this.columnsNumericUpDown.Minimum = new decimal(new int[] {
+            1,
+            0,
+            0,
+            0});
+      this.columnsNumericUpDown.Name = "columnsNumericUpDown";
+      this.columnsNumericUpDown.Size = new System.Drawing.Size(94, 20);
+      this.columnsNumericUpDown.TabIndex = 1;
+      this.columnsNumericUpDown.Value = new decimal(new int[] {
+            4,
+            0,
+            0,
+            0});
+      this.columnsNumericUpDown.ValueChanged += new System.EventHandler(this.columnsNumericUpDown_ValueChanged);
       // 
       // RegressionSolutionTargetResponseGradientView
@@ -237,4 +247,5 @@
       this.scrollPanel.PerformLayout();
       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      ((System.ComponentModel.ISupportInitialize)(this.columnsNumericUpDown)).EndInit();
       this.ResumeLayout(false);
 
@@ -253,8 +264,8 @@
     private System.Windows.Forms.GroupBox variableGroupBox;
     private System.Windows.Forms.Panel scrollPanel;
-    private System.Windows.Forms.TextBox columnsTextBox;
     private System.Windows.Forms.Label columnsLabel;
     private System.Windows.Forms.ErrorProvider errorProvider;
     private System.Windows.Forms.Label label1;
+    private System.Windows.Forms.NumericUpDown columnsNumericUpDown;
   }
 }
Index: /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionTargetResponseGradientView.cs
===================================================================
--- /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionTargetResponseGradientView.cs	(revision 14088)
+++ /branches/HeuristicLab.RegressionSolutionGradientView/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionTargetResponseGradientView.cs	(revision 14089)
@@ -68,6 +68,4 @@
       densityComboBox.SelectedIndex = 1; // select Training
 
-      columnsTextBox.Text = "4";
-
       // Avoid additional horizontal scrollbar
       var vertScrollWidth = SystemInformation.VerticalScrollBarWidth;
@@ -132,4 +130,12 @@
         };
         densityCharts.Add(variableName, densityChart);
+
+        gradientChart.ZoomChanged += (o, e) => {
+          var gradient = (GradientChart)o;
+          var density = densityCharts[gradient.FreeVariable];
+          density.Visible = densityComboBox.SelectedIndex != 0 && !gradient.IsZoomed;
+          if (density.Visible)
+            UpdateDensityChart(density, gradient.FreeVariable);
+        };
 
         var panel = new Panel() {
@@ -331,8 +337,8 @@
           var variableName = entry.Key;
           var densityChart = entry.Value;
-          if (!VisibleVariables.Contains(variableName))
+          if (!VisibleVariables.Contains(variableName) || gradientCharts[variableName].IsZoomed)
             continue;
+
           UpdateDensityChart(densityChart, variableName, indices);
-
         }
       }
@@ -368,18 +374,6 @@
     }
 
-    private void columnsTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e) {
-      int columns;
-      if (!int.TryParse(columnsTextBox.Text, out columns)) {
-        e.Cancel = true;
-        columnsTextBox.Select();
-        var textBox = (TextBox)sender;
-        errorProvider.SetError(columnsTextBox, "Columns number must be a positive integer.");
-        errorProvider.SetIconPadding(textBox, -20);
-      }
-    }
-
-    private void columnsTextBox_Validated(object sender, EventArgs e) {
-      errorProvider.SetError(columnsTextBox, "");
-      MaxColumns = int.Parse(columnsTextBox.Text);
+    private void columnsNumericUpDown_ValueChanged(object sender, EventArgs e) {
+      MaxColumns = (int)columnsNumericUpDown.Value;
       int columns = Math.Min(VisibleVariables.Count(), MaxColumns);
       if (columns > 0) {
