Changeset 11205 for branches/HiveStatistics/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs
- Timestamp:
- 07/18/14 13:44:53 (10 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 2 edited
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.cs
r11203 r11205 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
Note: See TracChangeset
for help on using the changeset viewer.