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