Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionParameterAnalysisView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionParameterAnalysisView.Designer.cs	(revision 14640)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionParameterAnalysisView.Designer.cs	(revision 14641)
@@ -58,9 +58,10 @@
       this.groupsTreeView = new System.Windows.Forms.TreeView();
       this.splitContainer = new System.Windows.Forms.SplitContainer();
+      this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+      this.parametersGroupBox = new System.Windows.Forms.GroupBox();
+      this.parametersTreeView = new System.Windows.Forms.TreeView();
       this.groupsGroupBox = new System.Windows.Forms.GroupBox();
       this.removeGroupButton = new System.Windows.Forms.Button();
       this.addGroupButton = new System.Windows.Forms.Button();
-      this.parametersGroupBox = new System.Windows.Forms.GroupBox();
-      this.parametersTreeView = new System.Windows.Forms.TreeView();
       this.dataRowsGroupBox = new System.Windows.Forms.GroupBox();
       this.minMaxCheckBox = new System.Windows.Forms.CheckBox();
@@ -68,5 +69,4 @@
       this.quartilesCheckBox = new System.Windows.Forms.CheckBox();
       this.averageCheckBox = new System.Windows.Forms.CheckBox();
-      this.splitContainer1 = new System.Windows.Forms.SplitContainer();
       ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit();
       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
@@ -75,11 +75,11 @@
       this.splitContainer.Panel2.SuspendLayout();
       this.splitContainer.SuspendLayout();
-      this.groupsGroupBox.SuspendLayout();
-      this.parametersGroupBox.SuspendLayout();
-      this.dataRowsGroupBox.SuspendLayout();
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
       this.splitContainer1.Panel1.SuspendLayout();
       this.splitContainer1.Panel2.SuspendLayout();
       this.splitContainer1.SuspendLayout();
+      this.parametersGroupBox.SuspendLayout();
+      this.groupsGroupBox.SuspendLayout();
+      this.dataRowsGroupBox.SuspendLayout();
       this.SuspendLayout();
       // 
@@ -124,5 +124,4 @@
       title1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
       title1.Name = "title";
-      title1.Text = "Title";
       this.chart.Titles.Add(title1);
       this.chart.CustomizeLegend += new System.EventHandler<System.Windows.Forms.DataVisualization.Charting.CustomizeLegendEventArgs>(this.chart_CustomizeLegend);
@@ -175,4 +174,5 @@
             | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
+      this.groupsTreeView.CheckBoxes = true;
       this.groupsTreeView.HideSelection = false;
       this.groupsTreeView.Location = new System.Drawing.Point(6, 49);
@@ -181,4 +181,5 @@
       this.groupsTreeView.Size = new System.Drawing.Size(255, 524);
       this.groupsTreeView.TabIndex = 2;
+      this.groupsTreeView.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.groupsTreeView_AfterCheck);
       this.groupsTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.groupsTreeView_AfterSelect);
       // 
@@ -203,4 +204,50 @@
       this.splitContainer.SplitterDistance = 273;
       this.splitContainer.TabIndex = 0;
+      // 
+      // splitContainer1
+      // 
+      this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.splitContainer1.Location = new System.Drawing.Point(0, 0);
+      this.splitContainer1.Name = "splitContainer1";
+      this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
+      // 
+      // splitContainer1.Panel1
+      // 
+      this.splitContainer1.Panel1.Controls.Add(this.parametersGroupBox);
+      // 
+      // splitContainer1.Panel2
+      // 
+      this.splitContainer1.Panel2.Controls.Add(this.groupsGroupBox);
+      this.splitContainer1.Size = new System.Drawing.Size(273, 851);
+      this.splitContainer1.SplitterDistance = 261;
+      this.splitContainer1.TabIndex = 0;
+      // 
+      // parametersGroupBox
+      // 
+      this.parametersGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.parametersGroupBox.Controls.Add(this.parametersTreeView);
+      this.parametersGroupBox.Location = new System.Drawing.Point(3, 3);
+      this.parametersGroupBox.Name = "parametersGroupBox";
+      this.parametersGroupBox.Size = new System.Drawing.Size(267, 255);
+      this.parametersGroupBox.TabIndex = 0;
+      this.parametersGroupBox.TabStop = false;
+      this.parametersGroupBox.Text = "&Parameters";
+      // 
+      // parametersTreeView
+      // 
+      this.parametersTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+      this.parametersTreeView.CheckBoxes = true;
+      this.parametersTreeView.HideSelection = false;
+      this.parametersTreeView.Location = new System.Drawing.Point(6, 19);
+      this.parametersTreeView.Name = "parametersTreeView";
+      this.parametersTreeView.ShowRootLines = false;
+      this.parametersTreeView.Size = new System.Drawing.Size(255, 230);
+      this.parametersTreeView.TabIndex = 0;
+      this.parametersTreeView.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.parametersTreeView_AfterCheck);
+      this.parametersTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.parametersTreeView_AfterSelect);
       // 
       // groupsGroupBox
@@ -241,30 +288,4 @@
       this.addGroupButton.Click += new System.EventHandler(this.addGroupButton_Click);
       // 
-      // parametersGroupBox
-      // 
-      this.parametersGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-      this.parametersGroupBox.Controls.Add(this.parametersTreeView);
-      this.parametersGroupBox.Location = new System.Drawing.Point(3, 3);
-      this.parametersGroupBox.Name = "parametersGroupBox";
-      this.parametersGroupBox.Size = new System.Drawing.Size(267, 255);
-      this.parametersGroupBox.TabIndex = 0;
-      this.parametersGroupBox.TabStop = false;
-      this.parametersGroupBox.Text = "&Parameters";
-      // 
-      // parametersTreeView
-      // 
-      this.parametersTreeView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
-            | System.Windows.Forms.AnchorStyles.Left) 
-            | System.Windows.Forms.AnchorStyles.Right)));
-      this.parametersTreeView.HideSelection = false;
-      this.parametersTreeView.Location = new System.Drawing.Point(6, 19);
-      this.parametersTreeView.Name = "parametersTreeView";
-      this.parametersTreeView.ShowRootLines = false;
-      this.parametersTreeView.Size = new System.Drawing.Size(255, 230);
-      this.parametersTreeView.TabIndex = 0;
-      this.parametersTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.parametersTreeView_AfterSelect);
-      // 
       // dataRowsGroupBox
       // 
@@ -328,22 +349,4 @@
       this.averageCheckBox.UseVisualStyleBackColor = true;
       this.averageCheckBox.CheckedChanged += new System.EventHandler(this.dataRowCheckBox_CheckedChanged);
-      // 
-      // splitContainer1
-      // 
-      this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
-      this.splitContainer1.Location = new System.Drawing.Point(0, 0);
-      this.splitContainer1.Name = "splitContainer1";
-      this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
-      // 
-      // splitContainer1.Panel1
-      // 
-      this.splitContainer1.Panel1.Controls.Add(this.parametersGroupBox);
-      // 
-      // splitContainer1.Panel2
-      // 
-      this.splitContainer1.Panel2.Controls.Add(this.groupsGroupBox);
-      this.splitContainer1.Size = new System.Drawing.Size(273, 851);
-      this.splitContainer1.SplitterDistance = 261;
-      this.splitContainer1.TabIndex = 0;
       // 
       // RunCollectionParameterAnalysisView
@@ -361,12 +364,12 @@
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
       this.splitContainer.ResumeLayout(false);
-      this.groupsGroupBox.ResumeLayout(false);
-      this.parametersGroupBox.ResumeLayout(false);
-      this.dataRowsGroupBox.ResumeLayout(false);
-      this.dataRowsGroupBox.PerformLayout();
       this.splitContainer1.Panel1.ResumeLayout(false);
       this.splitContainer1.Panel2.ResumeLayout(false);
       ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
       this.splitContainer1.ResumeLayout(false);
+      this.parametersGroupBox.ResumeLayout(false);
+      this.groupsGroupBox.ResumeLayout(false);
+      this.dataRowsGroupBox.ResumeLayout(false);
+      this.dataRowsGroupBox.PerformLayout();
       this.ResumeLayout(false);
 
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionParameterAnalysisView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionParameterAnalysisView.cs	(revision 14640)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionParameterAnalysisView.cs	(revision 14641)
@@ -202,4 +202,5 @@
       parametersTreeView.Nodes.Add(paramsRoot);
       paramsRoot.Expand();
+      paramsRoot.Checked = true;
       parametersTreeView.SelectedNode = paramsRoot;
 
@@ -244,76 +245,85 @@
       chart.Series.Clear();
       chart.Legends[0].CustomItems.Clear();
-      var selectedNode = groupsTreeView.Focused ? groupsTreeView.SelectedNode : parametersTreeView.SelectedNode;
-      if (selectedNode == null) return;
-      if (selectedNode.Parent == null) {
-        var series = BuildSeries(selectedNode.Tag as IEnumerable<IRun>, colors[0]);
-        chart.Titles[0].Text = selectedNode.Text;
-        foreach (var s in series)
-          chart.Series.Add(s);
-        var legendItem = new LegendItem();
-        var legendItemInfo = new LegendItemInfo(colors[0], series);
-        legendItem.Color = legendItemInfo.Color;
-        legendItem.BorderColor = Color.Transparent;
-        legendItem.Name = selectedNode.Text;
-        legendItem.Tag = legendItemInfo;
-        chart.Legends[0].CustomItems.Add(legendItem);
-      } else if (selectedNode.Tag is ParameterInfo) {
-        var paramInfo = selectedNode.Tag as ParameterInfo;
-        chart.Titles[0].Text = paramInfo.Name + " (" + paramInfo.RunCount + ")";
-        foreach (var value in paramInfo.Values) {
-          var series = BuildSeries(value.Value.Runs, value.Value.Color);
+      chart.Titles[0].Text = string.Empty;
+
+      var checkedNodes = TraverseTreeNodes(parametersTreeView.Nodes)
+                           .Where(x => x.Checked)
+                           .Concat(
+                             TraverseTreeNodes(groupsTreeView.Nodes)
+                               .Where(x => x.Checked)
+                           );
+
+      foreach (var node in checkedNodes) {
+        if (node.Parent == null) {
+          var series = BuildSeries(node.Tag as IEnumerable<IRun>, colors[0]);
+          chart.Titles[0].Text = node.Text;
           foreach (var s in series)
             chart.Series.Add(s);
           var legendItem = new LegendItem();
-          var legendItemInfo = new LegendItemInfo(value.Value.Color, series);
+          var legendItemInfo = new LegendItemInfo(colors[0], series);
           legendItem.Color = legendItemInfo.Color;
           legendItem.BorderColor = Color.Transparent;
-          legendItem.Name = value.Key + " (" + value.Value.RunCount + ")";
+          legendItem.Name = node.Text;
           legendItem.Tag = legendItemInfo;
           chart.Legends[0].CustomItems.Add(legendItem);
-        }
-      } else if (selectedNode.Tag is ParameterValueInfo) {
-        var valueInfo = selectedNode.Tag as ParameterValueInfo;
-        var series = BuildSeries(valueInfo.Runs, valueInfo.Color);
-        chart.Titles[0].Text = selectedNode.Parent.Text;
-        foreach (var s in series)
-          chart.Series.Add(s);
-        var legendItem = new LegendItem();
-        var legendItemInfo = new LegendItemInfo(valueInfo.Color, series);
-        legendItem.Color = legendItemInfo.Color;
-        legendItem.BorderColor = Color.Transparent;
-        legendItem.Name = selectedNode.Text;
-        legendItem.Tag = legendItemInfo;
-        chart.Legends[0].CustomItems.Add(legendItem);
-      } else if (selectedNode.Tag is GroupInfo) {
-        var groupInfo = selectedNode.Tag as GroupInfo;
-        if (groupInfo.IsParameter) {
-          chart.Titles[0].Text = groupInfo.Text + " (" + groupInfo.Runs.Count + ")";
-          foreach (TreeNode node in selectedNode.Nodes) {
-            var childInfo = node.Tag as GroupInfo;
-            var series = BuildSeries(childInfo.Runs, childInfo.Color);
+        } else if (node.Tag is ParameterInfo) {
+          var paramInfo = node.Tag as ParameterInfo;
+          chart.Titles[0].Text = paramInfo.Name + " (" + paramInfo.RunCount + ")";
+          foreach (var value in paramInfo.Values) {
+            var series = BuildSeries(value.Value.Runs, value.Value.Color);
             foreach (var s in series)
               chart.Series.Add(s);
             var legendItem = new LegendItem();
-            var legendItemInfo = new LegendItemInfo(childInfo.Color, series);
+            var legendItemInfo = new LegendItemInfo(value.Value.Color, series);
             legendItem.Color = legendItemInfo.Color;
             legendItem.BorderColor = Color.Transparent;
-            legendItem.Name = childInfo.Text + " (" + childInfo.Runs.Count + ")";
+            legendItem.Name = value.Key + " (" + value.Value.RunCount + ")";
             legendItem.Tag = legendItemInfo;
             chart.Legends[0].CustomItems.Add(legendItem);
           }
-        } else {
-          var parentInfo = selectedNode.Parent.Tag as GroupInfo;
-          chart.Titles[0].Text = parentInfo.Text + " (" + parentInfo.Runs.Count + ")";
-          var series = BuildSeries(groupInfo.Runs, groupInfo.Color);
+        } else if (node.Tag is ParameterValueInfo) {
+          var valueInfo = node.Tag as ParameterValueInfo;
+          var series = BuildSeries(valueInfo.Runs, valueInfo.Color);
+          chart.Titles[0].Text = node.Parent.Text;
           foreach (var s in series)
             chart.Series.Add(s);
           var legendItem = new LegendItem();
-          var legendItemInfo = new LegendItemInfo(groupInfo.Color, series);
+          var legendItemInfo = new LegendItemInfo(valueInfo.Color, series);
           legendItem.Color = legendItemInfo.Color;
           legendItem.BorderColor = Color.Transparent;
-          legendItem.Name = groupInfo.Text + " (" + groupInfo.Runs.Count + ")";
+          legendItem.Name = node.Text;
           legendItem.Tag = legendItemInfo;
           chart.Legends[0].CustomItems.Add(legendItem);
+        } else if (node.Tag is GroupInfo) {
+          var groupInfo = node.Tag as GroupInfo;
+          if (groupInfo.IsParameter) {
+            chart.Titles[0].Text = groupInfo.Text + " (" + groupInfo.Runs.Count + ")";
+            foreach (TreeNode child in node.Nodes) {
+              var childInfo = child.Tag as GroupInfo;
+              var series = BuildSeries(childInfo.Runs, childInfo.Color);
+              foreach (var s in series)
+                chart.Series.Add(s);
+              var legendItem = new LegendItem();
+              var legendItemInfo = new LegendItemInfo(childInfo.Color, series);
+              legendItem.Color = legendItemInfo.Color;
+              legendItem.BorderColor = Color.Transparent;
+              legendItem.Name = childInfo.Text + " (" + childInfo.Runs.Count + ")";
+              legendItem.Tag = legendItemInfo;
+              chart.Legends[0].CustomItems.Add(legendItem);
+            }
+          } else {
+            var parentInfo = node.Parent.Tag as GroupInfo;
+            chart.Titles[0].Text = parentInfo.Text + " (" + parentInfo.Runs.Count + ")";
+            var series = BuildSeries(groupInfo.Runs, groupInfo.Color);
+            foreach (var s in series)
+              chart.Series.Add(s);
+            var legendItem = new LegendItem();
+            var legendItemInfo = new LegendItemInfo(groupInfo.Color, series);
+            legendItem.Color = legendItemInfo.Color;
+            legendItem.BorderColor = Color.Transparent;
+            legendItem.Name = groupInfo.Text + " (" + groupInfo.Runs.Count + ")";
+            legendItem.Tag = legendItemInfo;
+            chart.Legends[0].CustomItems.Add(legendItem);
+          }
         }
       }
@@ -474,12 +484,16 @@
     #region parametersTreeView
     private void parametersTreeView_AfterSelect(object sender, TreeViewEventArgs e) {
+      addGroupButton.Enabled = (parametersTreeView.SelectedNode != null) && (parametersTreeView.SelectedNode.Parent != null);
+    }
+    private void parametersTreeView_AfterCheck(object sender, TreeViewEventArgs e) {
       UpdateChart();
-      addGroupButton.Enabled = (parametersTreeView.SelectedNode != null) && (parametersTreeView.SelectedNode.Parent != null);
     }
     #endregion
     #region groupsTreeView
     private void groupsTreeView_AfterSelect(object sender, TreeViewEventArgs e) {
+      removeGroupButton.Enabled = (groupsTreeView.SelectedNode != null) && (groupsTreeView.SelectedNode.Parent != null);
+    }
+    private void groupsTreeView_AfterCheck(object sender, TreeViewEventArgs e) {
       UpdateChart();
-      removeGroupButton.Enabled = (groupsTreeView.SelectedNode != null) && (groupsTreeView.SelectedNode.Parent != null);
     }
     #endregion
@@ -493,23 +507,23 @@
         var paramInfo = param.Tag as ParameterInfo;
         var paramNode = new TreeNode();
-        int count = 0;
         foreach (var valueInfo in paramInfo.Values.Values) {
-          var runs = groupRuns.Intersect(valueInfo.Runs);
-          var valueNode = new TreeNode(valueInfo.Value + " (" + runs.Count() + ")");
-          count += runs.Count();
-          valueNode.Tag = new GroupInfo(valueInfo.Value, valueInfo.Color, runs, false);
+          var valueRuns = groupRuns.Intersect(valueInfo.Runs);
+          var valueNode = new TreeNode(valueInfo.Value + " (" + valueRuns.Count() + ")");
+          valueNode.Tag = new GroupInfo(valueInfo.Value, valueInfo.Color, valueRuns, false);
           paramNode.Nodes.Add(valueNode);
         }
-        paramNode.Text = paramInfo.Name + " (" + count + ")";
-        paramNode.Tag = new GroupInfo(paramInfo.Name, Color.Empty, paramInfo.Values.Values.SelectMany(x => x.Runs), true);
+        var paramRuns = groupRuns.Intersect(paramInfo.Runs);
+        paramNode.Text = paramInfo.Name + " (" + paramRuns.Count() + ")";
+        paramNode.Tag = new GroupInfo(paramInfo.Name, Color.Empty, paramRuns, true);
         group.Nodes.Add(paramNode);
       } else if (param.Tag is ParameterValueInfo) {
         var paramInfo = param.Parent.Tag as ParameterInfo;
         var valueInfo = param.Tag as ParameterValueInfo;
-        var runs = groupRuns.Intersect(valueInfo.Runs);
-        var paramNode = new TreeNode(paramInfo.Name + " (" + runs.Count() + ")");
-        var valueNode = new TreeNode(valueInfo.Value + " (" + runs.Count() + ")");
-        valueNode.Tag = new GroupInfo(valueInfo.Value, valueInfo.Color, runs, false);
-        paramNode.Tag = new GroupInfo(paramInfo.Name, Color.Empty, runs, true);
+        var valueRuns = groupRuns.Intersect(valueInfo.Runs);
+        var paramRuns = groupRuns.Intersect(paramInfo.Runs);
+        var paramNode = new TreeNode(paramInfo.Name + " (" + paramRuns.Count() + ")");
+        var valueNode = new TreeNode(valueInfo.Value + " (" + valueRuns.Count() + ")");
+        valueNode.Tag = new GroupInfo(valueInfo.Value, valueInfo.Color, valueRuns, false);
+        paramNode.Tag = new GroupInfo(paramInfo.Name, Color.Empty, paramRuns, true);
         paramNode.Nodes.Add(valueNode);
         group.Nodes.Add(paramNode);
@@ -528,4 +542,14 @@
     }
     #endregion
+    #endregion
+
+    #region Helpers
+    private IEnumerable<TreeNode> TraverseTreeNodes(TreeNodeCollection nodes) {
+      foreach (var node in nodes.OfType<TreeNode>()) {
+        yield return node;
+        foreach (var child in TraverseTreeNodes(node.Nodes))
+          yield return child;
+      }
+    }
     #endregion
 
