Changeset 11202 for branches/HiveStatistics/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews
- Timestamp:
- 07/18/14 12:01:13 (10 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 4 deleted
- 7 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HiveStatistics/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.Designer.cs
r7967 r11202 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 61 61 this.tooltip = new System.Windows.Forms.ToolTip(this.components); 62 62 ((System.ComponentModel.ISupportInitialize)(this.chart)).BeginInit(); 63 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 63 64 this.splitContainer.Panel1.SuspendLayout(); 64 65 this.splitContainer.Panel2.SuspendLayout(); … … 71 72 this.xAxisLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 72 73 this.xAxisLabel.AutoSize = true; 73 this.xAxisLabel.Location = new System.Drawing.Point( 298, 256);74 this.xAxisLabel.Location = new System.Drawing.Point(363, 345); 74 75 this.xAxisLabel.Name = "xAxisLabel"; 75 76 this.xAxisLabel.Size = new System.Drawing.Size(15, 13); … … 83 84 this.xAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 84 85 this.xAxisComboBox.FormattingEnabled = true; 85 this.xAxisComboBox.Location = new System.Drawing.Point(3 19, 253);86 this.xAxisComboBox.Location = new System.Drawing.Point(384, 342); 86 87 this.xAxisComboBox.Name = "xAxisComboBox"; 87 this.xAxisComboBox.Size = new System.Drawing.Size( 221, 21);88 this.xAxisComboBox.Size = new System.Drawing.Size(600, 21); 88 89 this.xAxisComboBox.TabIndex = 11; 89 90 this.xAxisComboBox.SelectedIndexChanged += new System.EventHandler(this.AxisComboBox_SelectedIndexChanged); … … 105 106 this.yAxisComboBox.Location = new System.Drawing.Point(24, 3); 106 107 this.yAxisComboBox.Name = "yAxisComboBox"; 107 this.yAxisComboBox.Size = new System.Drawing.Size( 221, 21);108 this.yAxisComboBox.Size = new System.Drawing.Size(600, 21); 108 109 this.yAxisComboBox.TabIndex = 9; 109 110 this.yAxisComboBox.SelectedIndexChanged += new System.EventHandler(this.AxisComboBox_SelectedIndexChanged); … … 111 112 // chart 112 113 // 113 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 114 | System.Windows.Forms.AnchorStyles.Left)115 114 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 115 | System.Windows.Forms.AnchorStyles.Left) 116 | System.Windows.Forms.AnchorStyles.Right))); 116 117 chartArea1.Name = "ChartArea1"; 117 118 this.chart.ChartAreas.Add(chartArea1); 118 this.chart.Location = new System.Drawing.Point( 6, 30);119 this.chart.Location = new System.Drawing.Point(-1, 30); 119 120 this.chart.Name = "chart"; 120 121 series1.ChartArea = "ChartArea1"; … … 125 126 series1.YValuesPerPoint = 6; 126 127 this.chart.Series.Add(series1); 127 this.chart.Size = new System.Drawing.Size( 534, 217);128 this.chart.Size = new System.Drawing.Size(989, 306); 128 129 this.chart.TabIndex = 17; 129 130 this.chart.Text = "chart"; … … 135 136 this.noRunsLabel.Anchor = System.Windows.Forms.AnchorStyles.None; 136 137 this.noRunsLabel.AutoSize = true; 137 this.noRunsLabel.Location = new System.Drawing.Point( 212, 122);138 this.noRunsLabel.Location = new System.Drawing.Point(434, 167); 138 139 this.noRunsLabel.Name = "noRunsLabel"; 139 140 this.noRunsLabel.Size = new System.Drawing.Size(138, 13); … … 161 162 // 162 163 this.splitContainer.Panel2.Controls.Add(this.statisticsGroupBox); 163 this.splitContainer.Size = new System.Drawing.Size( 543, 416);164 this.splitContainer.SplitterDistance = 277;164 this.splitContainer.Size = new System.Drawing.Size(987, 550); 165 this.splitContainer.SplitterDistance = 366; 165 166 this.splitContainer.TabIndex = 23; 166 167 // … … 172 173 this.showStatisticsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked; 173 174 this.showStatisticsCheckBox.Image = HeuristicLab.Common.Resources.VSImageLibrary.Properties; 174 this.showStatisticsCheckBox.Location = new System.Drawing.Point( 6, 245);175 this.showStatisticsCheckBox.Location = new System.Drawing.Point(3, 339); 175 176 this.showStatisticsCheckBox.Name = "showStatisticsCheckBox"; 176 177 this.showStatisticsCheckBox.Size = new System.Drawing.Size(24, 24); … … 182 183 // statisticsGroupBox 183 184 // 184 this.statisticsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 185 | System.Windows.Forms.AnchorStyles.Left)186 185 this.statisticsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 186 | System.Windows.Forms.AnchorStyles.Left) 187 | System.Windows.Forms.AnchorStyles.Right))); 187 188 this.statisticsGroupBox.Controls.Add(this.statisticsMatrixView); 188 189 this.statisticsGroupBox.Location = new System.Drawing.Point(3, 3); 189 190 this.statisticsGroupBox.Name = "statisticsGroupBox"; 190 this.statisticsGroupBox.Size = new System.Drawing.Size( 534, 129);191 this.statisticsGroupBox.Size = new System.Drawing.Size(981, 174); 191 192 this.statisticsGroupBox.TabIndex = 1; 192 193 this.statisticsGroupBox.TabStop = false; … … 203 204 this.statisticsMatrixView.ShowRowsAndColumnsTextBox = false; 204 205 this.statisticsMatrixView.ShowStatisticalInformation = false; 205 this.statisticsMatrixView.Size = new System.Drawing.Size( 528, 110);206 this.statisticsMatrixView.Size = new System.Drawing.Size(975, 155); 206 207 this.statisticsMatrixView.TabIndex = 0; 207 208 // 208 209 // RunCollectionBoxPlotView 209 210 // 210 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);211 211 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 212 212 this.BackColor = System.Drawing.SystemColors.Window; … … 214 214 this.Controls.Add(this.splitContainer); 215 215 this.Name = "RunCollectionBoxPlotView"; 216 this.Size = new System.Drawing.Size( 543, 416);216 this.Size = new System.Drawing.Size(987, 550); 217 217 ((System.ComponentModel.ISupportInitialize)(this.chart)).EndInit(); 218 218 this.splitContainer.Panel1.ResumeLayout(false); 219 219 this.splitContainer.Panel1.PerformLayout(); 220 220 this.splitContainer.Panel2.ResumeLayout(false); 221 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); 221 222 this.splitContainer.ResumeLayout(false); 222 223 this.statisticsGroupBox.ResumeLayout(false); -
branches/HiveStatistics/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs
r9444 r11202 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 33 33 namespace HeuristicLab.Optimization.Views { 34 [View(" RunCollection BoxPlots")]34 [View("Box Plot")] 35 35 [Content(typeof(RunCollection), false)] 36 36 public partial class RunCollectionBoxPlotView : AsynchronousContentView { … … 122 122 Invoke(new EventHandler(Content_Reset), sender, e); 123 123 else { 124 this.categoricalMapping.Clear();125 124 UpdateDataPoints(); 126 125 UpdateAxisLabels(); … … 159 158 160 159 private void UpdateCaption() { 161 Caption = Content != null ? Content.OptimizerName + " Box Plot s" : ViewAttribute.GetViewName(GetType());160 Caption = Content != null ? Content.OptimizerName + " Box Plot" : ViewAttribute.GetViewName(GetType()); 162 161 } 163 162 … … 189 188 190 189 private void UpdateDataPoints() { 190 this.categoricalMapping.Clear(); 191 191 this.chart.Series.Clear(); 192 192 this.seriesCache.Clear(); … … 216 216 if (datapoint != null) { 217 217 IRun run = (IRun)datapoint.Tag; 218 string selectedAxis = (string)xAxisComboBox.SelectedItem;218 string selectedAxis = xAxisValue; 219 219 IItem value = null; 220 220 … … 234 234 } 235 235 matrix.ColumnNames = columnNames; 236 matrix.RowNames = new string[] { "Count", "Minimum", "Maximum", " Average", "Median", "Standard Deviation", "Variance", "25th Percentile", "75th Percentile" };236 matrix.RowNames = new string[] { "Count", "Minimum", "Maximum", "Median", "Average", "Standard Deviation", "Variance", "25th Percentile", "75th Percentile" }; 237 237 238 238 for (int i = 0; i < seriesCache.Count; i++) { … … 242 242 matrix[1, i] = seriesValues.Min(); 243 243 matrix[2, i] = seriesValues.Max(); 244 matrix[3, i] = seriesValues. Average();245 matrix[4, i] = seriesValues. Median();244 matrix[3, i] = seriesValues.Median(); 245 matrix[4, i] = seriesValues.Average(); 246 246 matrix[5, i] = seriesValues.StandardDeviation(); 247 247 matrix[6, i] = seriesValues.Variance(); … … 325 325 } 326 326 } 327 private double GetCategoricalValue(int dimension, string value) {327 private double? GetCategoricalValue(int dimension, string value) { 328 328 if (!this.categoricalMapping.ContainsKey(dimension)) { 329 329 this.categoricalMapping[dimension] = new Dictionary<object, double>(); … … 336 336 } 337 337 } 338 if (!this.categoricalMapping[dimension].ContainsKey(value)) return null; 338 339 return this.categoricalMapping[dimension][value]; 339 340 } 340 private double GetValue(IRun run, AxisDimension axisDimension) {341 double value = double.NaN;341 private double? GetValue(IRun run, AxisDimension axisDimension) { 342 double? value = double.NaN; 342 343 switch (axisDimension) { 343 344 case AxisDimension.Color: { … … 373 374 Axis yAxis = this.chart.ChartAreas[BoxPlotChartAreaName].AxisY; 374 375 int axisDimensionCount = Enum.GetNames(typeof(AxisDimension)).Count(); 375 SetCustomAxisLabels(xAxis, xAxisComboBox.SelectedIndex - axisDimensionCount); 376 SetCustomAxisLabels(yAxis, yAxisComboBox.SelectedIndex - axisDimensionCount); 377 if (xAxisComboBox.SelectedItem != null) 378 xAxis.Title = xAxisComboBox.SelectedItem.ToString(); 379 if (yAxisComboBox.SelectedItem != null) 380 yAxis.Title = yAxisComboBox.SelectedItem.ToString(); 376 //mkommend: combobox.SelectedIndex could not be used as this changes during hoovering over possible values 377 var xSAxisSelectedIndex = xAxisValue == null ? 0 : xAxisComboBox.Items.IndexOf(xAxisValue); 378 var ySAxisSelectedIndex = yAxisValue == null ? 0 : xAxisComboBox.Items.IndexOf(yAxisValue); 379 SetCustomAxisLabels(xAxis, xSAxisSelectedIndex - axisDimensionCount); 380 SetCustomAxisLabels(yAxis, ySAxisSelectedIndex - axisDimensionCount); 381 if (xAxisValue != null) 382 xAxis.Title = xAxisValue; 383 if (yAxisValue != null) 384 yAxis.Title = yAxisValue; 381 385 } 382 386 -
branches/HiveStatistics/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.Designer.cs
r9444 r11202 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 48 48 System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); 49 49 System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); 50 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RunCollectionBubbleChartView)); 50 51 this.yJitterLabel = new System.Windows.Forms.Label(); 51 52 this.xJitterlabel = new System.Windows.Forms.Label(); … … 71 72 this.transparencyTrackBar = new System.Windows.Forms.TrackBar(); 72 73 this.hideRunsButton = new System.Windows.Forms.Button(); 74 this.colorDialogButton = new System.Windows.Forms.Button(); 73 75 this.noRunsLabel = new System.Windows.Forms.Label(); 74 76 this.sizeTrackBar = new System.Windows.Forms.TrackBar(); … … 77 79 this.unhideAllRunToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 78 80 this.colorResetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 79 this.colorDialogButton = new System.Windows.Forms.Button();80 81 ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).BeginInit(); 81 82 ((System.ComponentModel.ISupportInitialize)(this.yTrackBar)).BeginInit(); … … 89 90 // 90 91 this.yJitterLabel.AutoSize = true; 91 this.yJitterLabel.Location = new System.Drawing.Point( 278, 6);92 this.yJitterLabel.Location = new System.Drawing.Point(457, 6); 92 93 this.yJitterLabel.Name = "yJitterLabel"; 93 94 this.yJitterLabel.Size = new System.Drawing.Size(32, 13); … … 99 100 this.xJitterlabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 100 101 this.xJitterlabel.AutoSize = true; 101 this.xJitterlabel.Location = new System.Drawing.Point( 749, 472);102 this.xJitterlabel.Location = new System.Drawing.Point(893, 719); 102 103 this.xJitterlabel.Name = "xJitterlabel"; 103 104 this.xJitterlabel.Size = new System.Drawing.Size(32, 13); … … 109 110 this.xTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 110 111 this.xTrackBar.Enabled = false; 111 this.xTrackBar.Location = new System.Drawing.Point( 787, 469);112 this.xTrackBar.Location = new System.Drawing.Point(919, 715); 112 113 this.xTrackBar.Maximum = 100; 113 114 this.xTrackBar.Name = "xTrackBar"; … … 121 122 this.xAxisLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 122 123 this.xAxisLabel.AutoSize = true; 123 this.xAxisLabel.Location = new System.Drawing.Point(4 71, 472);124 this.xAxisLabel.Location = new System.Drawing.Point(439, 719); 124 125 this.xAxisLabel.Name = "xAxisLabel"; 125 126 this.xAxisLabel.Size = new System.Drawing.Size(15, 13); … … 132 133 this.xAxisComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight; 133 134 this.xAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 135 this.xAxisComboBox.DropDownWidth = 500; 134 136 this.xAxisComboBox.FormattingEnabled = true; 135 this.xAxisComboBox.Location = new System.Drawing.Point(4 92, 469);137 this.xAxisComboBox.Location = new System.Drawing.Point(460, 715); 136 138 this.xAxisComboBox.Name = "xAxisComboBox"; 137 this.xAxisComboBox.Size = new System.Drawing.Size( 221, 21);139 this.xAxisComboBox.Size = new System.Drawing.Size(400, 21); 138 140 this.xAxisComboBox.TabIndex = 7; 139 141 this.xAxisComboBox.SelectedValueChanged += new System.EventHandler(this.AxisComboBox_SelectedValueChanged); … … 152 154 this.yAxisComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight; 153 155 this.yAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 156 this.yAxisComboBox.DropDownWidth = 800; 154 157 this.yAxisComboBox.FormattingEnabled = true; 155 158 this.yAxisComboBox.Location = new System.Drawing.Point(24, 3); 156 159 this.yAxisComboBox.Name = "yAxisComboBox"; 157 this.yAxisComboBox.Size = new System.Drawing.Size( 221, 21);160 this.yAxisComboBox.Size = new System.Drawing.Size(400, 21); 158 161 this.yAxisComboBox.TabIndex = 5; 159 162 this.yAxisComboBox.SelectedValueChanged += new System.EventHandler(this.AxisComboBox_SelectedValueChanged); … … 162 165 // 163 166 this.yTrackBar.Enabled = false; 164 this.yTrackBar.Location = new System.Drawing.Point( 312, 3);167 this.yTrackBar.Location = new System.Drawing.Point(483, 3); 165 168 this.yTrackBar.Maximum = 100; 166 169 this.yTrackBar.Name = "yTrackBar"; … … 175 178 this.sizeComboBox.BackColor = System.Drawing.SystemColors.ControlLightLight; 176 179 this.sizeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 180 this.sizeComboBox.DropDownWidth = 400; 177 181 this.sizeComboBox.FormattingEnabled = true; 178 this.sizeComboBox.Location = new System.Drawing.Point( 560, 4);182 this.sizeComboBox.Location = new System.Drawing.Point(613, 3); 179 183 this.sizeComboBox.Name = "sizeComboBox"; 180 this.sizeComboBox.Size = new System.Drawing.Size( 221, 21);184 this.sizeComboBox.Size = new System.Drawing.Size(300, 21); 181 185 this.sizeComboBox.TabIndex = 14; 182 186 this.sizeComboBox.SelectedValueChanged += new System.EventHandler(this.AxisComboBox_SelectedValueChanged); … … 186 190 this.sizeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 187 191 this.sizeLabel.AutoSize = true; 188 this.sizeLabel.Location = new System.Drawing.Point( 489, 7);192 this.sizeLabel.Location = new System.Drawing.Point(541, 6); 189 193 this.sizeLabel.Name = "sizeLabel"; 190 194 this.sizeLabel.Size = new System.Drawing.Size(66, 13); … … 194 198 // chart 195 199 // 196 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 197 | System.Windows.Forms.AnchorStyles.Left) 200 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 201 | System.Windows.Forms.AnchorStyles.Left) 198 202 | System.Windows.Forms.AnchorStyles.Right))); 199 203 chartArea1.Name = "ChartArea1"; 200 204 this.chart.ChartAreas.Add(chartArea1); 201 this.chart.Location = new System.Drawing.Point( 6, 30);205 this.chart.Location = new System.Drawing.Point(-1, 30); 202 206 this.chart.Name = "chart"; 203 207 series1.ChartArea = "ChartArea1"; … … 208 212 series1.YValuesPerPoint = 2; 209 213 this.chart.Series.Add(series1); 210 this.chart.Size = new System.Drawing.Size( 843, 425);214 this.chart.Size = new System.Drawing.Size(988, 681); 211 215 this.chart.TabIndex = 16; 212 216 this.chart.Text = "chart"; … … 235 239 this.zoomButton.AutoSize = true; 236 240 this.zoomButton.Checked = true; 237 this.zoomButton.Location = new System.Drawing.Point(6, 1 0);241 this.zoomButton.Location = new System.Drawing.Point(6, 11); 238 242 this.zoomButton.Name = "zoomButton"; 239 243 this.zoomButton.Size = new System.Drawing.Size(52, 17); … … 248 252 this.selectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 249 253 this.selectButton.AutoSize = true; 250 this.selectButton.Location = new System.Drawing.Point(6 4, 9);254 this.selectButton.Location = new System.Drawing.Point(61, 11); 251 255 this.selectButton.Name = "selectButton"; 252 256 this.selectButton.Size = new System.Drawing.Size(55, 17); … … 260 264 this.radioButtonGroup.Controls.Add(this.zoomButton); 261 265 this.radioButtonGroup.Controls.Add(this.selectButton); 262 this.radioButtonGroup.Location = new System.Drawing.Point( 2, 461);266 this.radioButtonGroup.Location = new System.Drawing.Point(3, 704); 263 267 this.radioButtonGroup.Name = "radioButtonGroup"; 264 268 this.radioButtonGroup.Size = new System.Drawing.Size(122, 32); … … 271 275 this.colorRunsButton.Enabled = false; 272 276 this.colorRunsButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 273 this.colorRunsButton.Location = new System.Drawing.Point(13 0, 469);277 this.colorRunsButton.Location = new System.Drawing.Point(131, 713); 274 278 this.colorRunsButton.Name = "colorRunsButton"; 275 279 this.colorRunsButton.Size = new System.Drawing.Size(21, 21); … … 289 293 this.colorXAxisButton.Enabled = false; 290 294 this.colorXAxisButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.DisplayInColorVertical; 291 this.colorXAxisButton.Location = new System.Drawing.Point( 719, 469);295 this.colorXAxisButton.Location = new System.Drawing.Point(866, 715); 292 296 this.colorXAxisButton.Name = "colorXAxisButton"; 293 297 this.colorXAxisButton.Size = new System.Drawing.Size(21, 21); … … 301 305 this.colorYAxisButton.Enabled = false; 302 306 this.colorYAxisButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.DisplayInColor; 303 this.colorYAxisButton.Location = new System.Drawing.Point( 251, 3);307 this.colorYAxisButton.Location = new System.Drawing.Point(430, 3); 304 308 this.colorYAxisButton.Name = "colorYAxisButton"; 305 309 this.colorYAxisButton.Size = new System.Drawing.Size(21, 21); … … 313 317 this.transparencyTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 314 318 this.transparencyTrackBar.LargeChange = 16; 315 this.transparencyTrackBar.Location = new System.Drawing.Point(3 59, 470);319 this.transparencyTrackBar.Location = new System.Drawing.Point(302, 715); 316 320 this.transparencyTrackBar.Maximum = 254; 317 321 this.transparencyTrackBar.Name = "transparencyTrackBar"; … … 327 331 this.hideRunsButton.Enabled = false; 328 332 this.hideRunsButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 329 this.hideRunsButton.Location = new System.Drawing.Point(17 7, 469);333 this.hideRunsButton.Location = new System.Drawing.Point(172, 713); 330 334 this.hideRunsButton.Name = "hideRunsButton"; 331 335 this.hideRunsButton.Size = new System.Drawing.Size(43, 21); … … 336 340 this.hideRunsButton.Click += new System.EventHandler(this.hideRunsButton_Click); 337 341 // 342 // colorDialogButton 343 // 344 this.colorDialogButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 345 this.colorDialogButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 346 this.colorDialogButton.Enabled = false; 347 this.colorDialogButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 348 this.colorDialogButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 349 this.colorDialogButton.Location = new System.Drawing.Point(152, 713); 350 this.colorDialogButton.Name = "colorDialogButton"; 351 this.colorDialogButton.Size = new System.Drawing.Size(14, 21); 352 this.colorDialogButton.TabIndex = 25; 353 this.colorDialogButton.Text = "v"; 354 this.tooltip.SetToolTip(this.colorDialogButton, "Choose color"); 355 this.colorDialogButton.UseVisualStyleBackColor = true; 356 this.colorDialogButton.Click += new System.EventHandler(this.colorDialogButton_Click); 357 // 338 358 // noRunsLabel 339 359 // 340 360 this.noRunsLabel.Anchor = System.Windows.Forms.AnchorStyles.None; 341 361 this.noRunsLabel.AutoSize = true; 342 this.noRunsLabel.Location = new System.Drawing.Point( 366, 228);362 this.noRunsLabel.Location = new System.Drawing.Point(432, 350); 343 363 this.noRunsLabel.Name = "noRunsLabel"; 344 364 this.noRunsLabel.Size = new System.Drawing.Size(138, 13); … … 349 369 // 350 370 this.sizeTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 351 this.sizeTrackBar.Location = new System.Drawing.Point( 787, 3);371 this.sizeTrackBar.Location = new System.Drawing.Point(919, 3); 352 372 this.sizeTrackBar.Maximum = 20; 353 373 this.sizeTrackBar.Minimum = -20; … … 370 390 this.transparencyLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 371 391 this.transparencyLabel.AutoSize = true; 372 this.transparencyLabel.Location = new System.Drawing.Point(2 78, 475);392 this.transparencyLabel.Location = new System.Drawing.Point(233, 717); 373 393 this.transparencyLabel.Name = "transparencyLabel"; 374 394 this.transparencyLabel.Size = new System.Drawing.Size(75, 13); … … 390 410 this.colorResetToolStripMenuItem.Click += new System.EventHandler(this.colorResetToolStripMenuItem_Click); 391 411 // 392 // colorDialogButton393 //394 this.colorDialogButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));395 this.colorDialogButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;396 this.colorDialogButton.Enabled = false;397 this.colorDialogButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));398 this.colorDialogButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;399 this.colorDialogButton.Location = new System.Drawing.Point(150, 469);400 this.colorDialogButton.Name = "colorDialogButton";401 this.colorDialogButton.Size = new System.Drawing.Size(14, 21);402 this.colorDialogButton.TabIndex = 25;403 this.colorDialogButton.Text = "v";404 this.tooltip.SetToolTip(this.colorDialogButton, "Choose color");405 this.colorDialogButton.UseVisualStyleBackColor = true;406 this.colorDialogButton.Click += new System.EventHandler(this.colorDialogButton_Click);407 //408 412 // RunCollectionBubbleChartView 409 413 // … … 412 416 this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 413 417 this.Controls.Add(this.hideRunsButton); 414 this.Controls.Add(this.transparencyTrackBar);415 418 this.Controls.Add(this.sizeTrackBar); 416 419 this.Controls.Add(this.colorYAxisButton); … … 419 422 this.Controls.Add(this.colorRunsButton); 420 423 this.Controls.Add(this.radioButtonGroup); 421 this.Controls.Add(this.sizeLabel);422 this.Controls.Add(this.sizeComboBox);423 424 this.Controls.Add(this.yJitterLabel); 424 425 this.Controls.Add(this.transparencyLabel); … … 432 433 this.Controls.Add(this.colorDialogButton); 433 434 this.Controls.Add(this.chart); 435 this.Controls.Add(this.transparencyTrackBar); 436 this.Controls.Add(this.sizeLabel); 437 this.Controls.Add(this.sizeComboBox); 434 438 this.Name = "RunCollectionBubbleChartView"; 435 this.Size = new System.Drawing.Size( 854, 496);439 this.Size = new System.Drawing.Size(986, 741); 436 440 ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).EndInit(); 437 441 ((System.ComponentModel.ISupportInitialize)(this.yTrackBar)).EndInit(); -
branches/HiveStatistics/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs
r9444 r11202 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 33 33 34 34 namespace HeuristicLab.Optimization.Views { 35 [View(" RunCollection BubbleChart")]35 [View("Bubble Chart")] 36 36 [Content(typeof(RunCollection), false)] 37 37 public partial class RunCollectionBubbleChartView : AsynchronousContentView { … … 56 56 private bool suppressUpdates = false; 57 57 58 private const double transperencyExponent = 2.5; 59 60 private RunCollectionContentConstraint visibilityConstraint = new RunCollectionContentConstraint() { Active = true }; 58 private readonly RunCollectionContentConstraint visibilityConstraint = new RunCollectionContentConstraint() { Active = true }; 61 59 62 60 public RunCollectionBubbleChartView() { … … 155 153 if (suppressUpdates) return; 156 154 157 foreach (var run in Content) UpdateRun(run); 158 UpdateMarkerSizes(); 159 UpdateCursorInterval(); 160 chart.ChartAreas[0].RecalculateAxesScale(); 155 UpdateDataPoints(); 161 156 UpdateAxisLabels(); 162 157 } … … 192 187 protected override void OnContentChanged() { 193 188 base.OnContentChanged(); 194 this.categoricalMapping.Clear();195 189 UpdateComboBoxes(); 196 190 UpdateDataPoints(); 197 191 UpdateCaption(); 198 RebuildInverseIndex();199 192 } 200 193 … … 269 262 Invoke(new EventHandler(Content_Reset), sender, e); 270 263 else { 271 this.categoricalMapping.Clear();272 RebuildInverseIndex();273 264 UpdateDataPoints(); 274 265 UpdateAxisLabels(); … … 280 271 series.Points.Clear(); 281 272 runToDataPointMapping.Clear(); 273 categoricalMapping.Clear(); 282 274 selectedRuns.Clear(); 275 RebuildInverseIndex(); 283 276 284 277 chart.ChartAreas[0].AxisX.IsMarginVisible = xAxisValue != AxisDimension.Index.ToString(); … … 440 433 } 441 434 } 442 private double GetCategoricalValue(int dimension, string value) {435 private double? GetCategoricalValue(int dimension, string value) { 443 436 if (!this.categoricalMapping.ContainsKey(dimension)) { 444 437 this.categoricalMapping[dimension] = new Dictionary<object, double>(); … … 451 444 } 452 445 } 446 if (!this.categoricalMapping[dimension].ContainsKey(value)) return null; 453 447 return this.categoricalMapping[dimension][value]; 454 448 } … … 557 551 var point = chart.Series[0].Points[pointIndex]; 558 552 IRun run = (IRun)point.Tag; 559 point.Color = Color.Red; 560 point.MarkerStyle = MarkerStyle.Cross; 561 selectedRuns.Add(run); 553 if (selectedRuns.Contains(run)) { 554 point.MarkerStyle = MarkerStyle.Circle; 555 point.Color = Color.FromArgb(255 - LogTransform(transparencyTrackBar.Value), run.Color); 556 selectedRuns.Remove(run); 557 } else { 558 point.Color = Color.Red; 559 point.MarkerStyle = MarkerStyle.Cross; 560 selectedRuns.Add(run); 561 } 562 562 } 563 563 } else { … … 663 663 Axis yAxis = this.chart.ChartAreas[0].AxisY; 664 664 int axisDimensionCount = Enum.GetNames(typeof(AxisDimension)).Count(); 665 SetCustomAxisLabels(xAxis, xAxisComboBox.SelectedIndex - axisDimensionCount); 666 SetCustomAxisLabels(yAxis, yAxisComboBox.SelectedIndex - axisDimensionCount); 667 if (xAxisComboBox.SelectedItem != null) 668 xAxis.Title = xAxisComboBox.SelectedItem.ToString(); 669 if (yAxisComboBox.SelectedItem != null) 670 yAxis.Title = yAxisComboBox.SelectedItem.ToString(); 665 //mkommend: combobox.SelectedIndex could not be used as this changes during hovering over possible values 666 var xSAxisSelectedIndex = xAxisValue == null ? 0 : xAxisComboBox.Items.IndexOf(xAxisValue); 667 var ySAxisSelectedIndex = yAxisValue == null ? 0 : xAxisComboBox.Items.IndexOf(yAxisValue); 668 SetCustomAxisLabels(xAxis, xSAxisSelectedIndex - axisDimensionCount); 669 SetCustomAxisLabels(yAxis, ySAxisSelectedIndex - axisDimensionCount); 670 if (xAxisValue != null) 671 xAxis.Title = xAxisValue; 672 if(yAxisValue != null) 673 yAxis.Title = yAxisValue; 671 674 } 672 675 … … 710 713 } 711 714 712 private IRun runToHide = null;713 715 private void ContextMenuStrip_Opening(object sender, System.ComponentModel.CancelEventArgs e) { 714 var pos = Control.MousePosition; 715 var chartPos = chart.PointToClient(pos); 716 717 HitTestResult h = this.chart.HitTest(chartPos.X, chartPos.Y, ChartElementType.DataPoint); 718 if (h.ChartElementType == ChartElementType.DataPoint) { 719 runToHide = (IRun)((DataPoint)h.Object).Tag; 720 hideRunsToolStripMenuItem.Visible = true; 721 } else { 722 runToHide = null; 723 hideRunsToolStripMenuItem.Visible = false; 724 } 716 hideRunsToolStripMenuItem.Visible = selectedRuns.Any(); 725 717 } 726 718 … … 730 722 } 731 723 private void hideRunsToolStripMenuItem_Click(object sender, EventArgs e) { 732 HideRuns(selectedRuns); 724 //ToList is necessary to prevent lazy evaluation 725 HideRuns(selectedRuns.ToList()); 733 726 //could not use ClearSelectedRuns as the runs are not visible anymore 734 727 selectedRuns.Clear(); 735 728 } 736 729 private void hideRunsButton_Click(object sender, EventArgs e) { 737 HideRuns(selectedRuns); 730 //ToList is necessary to prevent lazy evaluation 731 HideRuns(selectedRuns.ToList()); 738 732 //could not use ClearSelectedRuns as the runs are not visible anymore 739 733 selectedRuns.Clear(); … … 743 737 visibilityConstraint.Active = false; 744 738 if (!Content.Constraints.Contains(visibilityConstraint)) Content.Constraints.Add(visibilityConstraint); 745 foreach (var run in selectedRuns) {739 foreach (var run in runs) { 746 740 visibilityConstraint.ConstraintData.Add(run); 747 741 } -
branches/HiveStatistics/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionView.Designer.cs
r7469 r11202 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HiveStatistics/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionView.cs
r7469 r11202 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 2Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 255 255 if (e.KeyCode == Keys.Delete) { 256 256 if ((itemsListView.SelectedItems.Count > 0) && !Content.IsReadOnly && !ReadOnly) { 257 foreach (ListViewItem item in itemsListView.SelectedItems) 258 Content.Remove((IRun)item.Tag); 257 if (RunCollection != null) { 258 RunCollection.RemoveRange(itemsListView.SelectedItems.Cast<ListViewItem>().Select(i => (IRun)i.Tag)); 259 } else { 260 foreach (ListViewItem item in itemsListView.SelectedItems) 261 Content.Remove((IRun)item.Tag); 262 } 259 263 } 260 264 } … … 350 354 private void removeButton_Click(object sender, EventArgs e) { 351 355 if (itemsListView.SelectedItems.Count > 0) { 352 foreach (ListViewItem item in itemsListView.SelectedItems) 353 Content.Remove((IRun)item.Tag); 356 if (RunCollection != null) { 357 RunCollection.RemoveRange(itemsListView.SelectedItems.Cast<ListViewItem>().Select(i => (IRun)i.Tag)); 358 } else { 359 foreach (ListViewItem item in itemsListView.SelectedItems) 360 Content.Remove((IRun)item.Tag); 361 } 354 362 itemsListView.SelectedItems.Clear(); 355 363 } … … 377 385 try { 378 386 RunCollection.Modify(); 379 } finally { 387 } 388 finally { 380 389 ReadOnly = false; 381 390 }
Note: See TracChangeset
for help on using the changeset viewer.