Changeset 3543 for trunk/sources
- Timestamp:
- 04/27/10 13:33:41 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimization.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.Designer.cs
r3524 r3543 44 44 this.colorDialog = new System.Windows.Forms.ColorDialog(); 45 45 this.tooltip = new System.Windows.Forms.ToolTip(this.components); 46 this.noRunsLabel = new System.Windows.Forms.Label(); 46 47 ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).BeginInit(); 47 48 ((System.ComponentModel.ISupportInitialize)(this.yTrackBar)).BeginInit(); … … 63 64 this.xJitterlabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 64 65 this.xJitterlabel.AutoSize = true; 65 this.xJitterlabel.Location = new System.Drawing.Point(5 69, 308);66 this.xJitterlabel.Location = new System.Drawing.Point(539, 295); 66 67 this.xJitterlabel.Name = "xJitterlabel"; 67 68 this.xJitterlabel.Size = new System.Drawing.Size(32, 13); … … 72 73 // 73 74 this.xTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 74 this.xTrackBar.Location = new System.Drawing.Point( 607, 305);75 this.xTrackBar.Location = new System.Drawing.Point(577, 292); 75 76 this.xTrackBar.Maximum = 100; 76 77 this.xTrackBar.Name = "xTrackBar"; … … 84 85 this.xAxisLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 85 86 this.xAxisLabel.AutoSize = true; 86 this.xAxisLabel.Location = new System.Drawing.Point( 320, 307);87 this.xAxisLabel.Location = new System.Drawing.Point(290, 294); 87 88 this.xAxisLabel.Name = "xAxisLabel"; 88 89 this.xAxisLabel.Size = new System.Drawing.Size(15, 13); … … 96 97 this.xAxisComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 97 98 this.xAxisComboBox.FormattingEnabled = true; 98 this.xAxisComboBox.Location = new System.Drawing.Point(3 41, 305);99 this.xAxisComboBox.Location = new System.Drawing.Point(311, 292); 99 100 this.xAxisComboBox.Name = "xAxisComboBox"; 100 101 this.xAxisComboBox.Size = new System.Drawing.Size(221, 21); … … 138 139 this.sizeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 139 140 this.sizeComboBox.FormattingEnabled = true; 140 this.sizeComboBox.Location = new System.Drawing.Point(4 48, 3);141 this.sizeComboBox.Location = new System.Drawing.Point(418, 3); 141 142 this.sizeComboBox.Name = "sizeComboBox"; 142 143 this.sizeComboBox.Size = new System.Drawing.Size(221, 21); … … 148 149 this.sizeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 149 150 this.sizeLabel.AutoSize = true; 150 this.sizeLabel.Location = new System.Drawing.Point(3 78, 6);151 this.sizeLabel.Location = new System.Drawing.Point(348, 6); 151 152 this.sizeLabel.Name = "sizeLabel"; 152 153 this.sizeLabel.Size = new System.Drawing.Size(66, 13); 153 154 this.sizeLabel.TabIndex = 15; 154 155 this.sizeLabel.Text = "Bubble Size:"; 155 this.sizeLabel.Click += new System.EventHandler(this.sizeLabel_Click);156 156 // 157 157 // chart … … 172 172 series1.YValuesPerPoint = 2; 173 173 this.chart.Series.Add(series1); 174 this.chart.Size = new System.Drawing.Size(6 63, 261);174 this.chart.Size = new System.Drawing.Size(633, 248); 175 175 this.chart.TabIndex = 16; 176 176 this.chart.Text = "chart"; … … 209 209 this.radioButtonGroup.Controls.Add(this.zoomButton); 210 210 this.radioButtonGroup.Controls.Add(this.selectButton); 211 this.radioButtonGroup.Location = new System.Drawing.Point(3, 2 97);211 this.radioButtonGroup.Location = new System.Drawing.Point(3, 284); 212 212 this.radioButtonGroup.Name = "radioButtonGroup"; 213 213 this.radioButtonGroup.Size = new System.Drawing.Size(135, 32); … … 220 220 this.colorButton.Enabled = false; 221 221 this.colorButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 222 this.colorButton.Location = new System.Drawing.Point(144, 305);222 this.colorButton.Location = new System.Drawing.Point(144, 292); 223 223 this.colorButton.Name = "colorButton"; 224 224 this.colorButton.Size = new System.Drawing.Size(64, 21); … … 233 233 this.colorDialog.FullOpen = true; 234 234 // 235 // noRunsLabel 236 // 237 this.noRunsLabel.Anchor = System.Windows.Forms.AnchorStyles.None; 238 this.noRunsLabel.AutoSize = true; 239 this.noRunsLabel.Location = new System.Drawing.Point(261, 139); 240 this.noRunsLabel.Name = "noRunsLabel"; 241 this.noRunsLabel.Size = new System.Drawing.Size(138, 13); 242 this.noRunsLabel.TabIndex = 21; 243 this.noRunsLabel.Text = "No runs could be displayed."; 244 // 235 245 // RunCollectionBubbleChartView 236 246 // … … 239 249 this.BackColor = System.Drawing.SystemColors.Window; 240 250 this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 251 this.Controls.Add(this.noRunsLabel); 241 252 this.Controls.Add(this.colorButton); 242 253 this.Controls.Add(this.radioButtonGroup); … … 253 264 this.Controls.Add(this.yTrackBar); 254 265 this.Name = "RunCollectionBubbleChartView"; 255 this.Size = new System.Drawing.Size(6 74, 332);266 this.Size = new System.Drawing.Size(644, 319); 256 267 ((System.ComponentModel.ISupportInitialize)(this.xTrackBar)).EndInit(); 257 268 ((System.ComponentModel.ISupportInitialize)(this.yTrackBar)).EndInit(); … … 283 294 private System.Windows.Forms.ColorDialog colorDialog; 284 295 private System.Windows.Forms.ToolTip tooltip; 296 private System.Windows.Forms.Label noRunsLabel; 285 297 } 286 298 } -
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs
r3536 r3543 63 63 this.isSelecting = false; 64 64 65 65 66 this.chart.ChartAreas[0].CursorX.IsUserSelectionEnabled = true; 66 67 this.chart.ChartAreas[0].CursorY.IsUserSelectionEnabled = true; 67 this.chart.ChartAreas[0].AxisX.ScaleView.Zoomable = !this.isSelecting;68 this.chart.ChartAreas[0].AxisY.ScaleView.Zoomable = !this.isSelecting;69 68 this.chart.ChartAreas[0].CursorX.Interval = 0; 70 69 this.chart.ChartAreas[0].CursorY.Interval = 0; 71 70 this.chart.ChartAreas[0].AxisX.ScaleView.Zoomable = !this.isSelecting; 71 this.chart.ChartAreas[0].AxisX.IntervalAutoMode = IntervalAutoMode.VariableCount; 72 this.chart.ChartAreas[0].AxisY.ScaleView.Zoomable = !this.isSelecting; 73 this.chart.ChartAreas[0].AxisY.IntervalAutoMode = IntervalAutoMode.VariableCount; 72 74 } 73 75 … … 179 181 foreach (IRun run in this.Content) 180 182 this.AddDataPoint(run); 181 //Thread.Sleep(100); 183 184 //check to correct max bubble size 185 if (this.chart.Series[0].Points.Select(p => p.YValues[1]).Distinct().Count() == 1) 186 this.chart.Series[0]["BubbleMaxSize"] = "2"; 187 else 188 this.chart.Series[0]["BubbleMaxSize"] = "7"; 189 190 if (this.chart.Series[0].Points.Count == 0) 191 noRunsLabel.Visible = true; 192 else 193 noRunsLabel.Visible = false; 182 194 } 183 195 } … … 190 202 xValue = GetValue(run, (string)xAxisComboBox.SelectedItem); 191 203 yValue = GetValue(run, (string)yAxisComboBox.SelectedItem); 192 if (xValue.HasValue && yValue.HasValue) {193 sizeValue = GetValue(run, (string)sizeComboBox.SelectedItem);194 xValue = xValue.Value + xValue.Value * GetXJitter( Content.ElementAt(row)) * xJitterFactor;195 yValue = yValue.Value + yValue.Value * GetYJitter( Content.ElementAt(row)) * yJitterFactor;204 sizeValue = GetValue(run, (string)sizeComboBox.SelectedItem); 205 if (xValue.HasValue && yValue.HasValue && sizeValue.HasValue) { 206 xValue = xValue.Value + xValue.Value * GetXJitter(run) * xJitterFactor; 207 yValue = yValue.Value + yValue.Value * GetYJitter(run) * yJitterFactor; 196 208 if (run.Visible) { 197 209 DataPoint point = new DataPoint(xValue.Value, new double[] { yValue.Value, sizeValue.Value }); … … 220 232 DoubleValue doubleValue = value as DoubleValue; 221 233 IntValue intValue = value as IntValue; 222 double ret; 223 if (doubleValue != null) 224 ret = doubleValue.Value; 225 else if (intValue != null) 234 double? ret = null; 235 if (doubleValue != null) { 236 if (!double.IsNaN(doubleValue.Value) && !double.IsInfinity(doubleValue.Value)) 237 ret = doubleValue.Value; 238 } else if (intValue != null) 226 239 ret = intValue.Value; 227 240 else … … 409 422 foreach (var pair in categoricalMapping[dimension]) { 410 423 string labelText = pair.Key.ToString(); 411 if (labelText.Length > 25)412 labelText = labelText.Substring(0, 25) + " ... ";424 if (labelText.Length > 25) 425 labelText = labelText.Substring(0, 25) + " ... "; 413 426 label = axis.CustomLabels.Add(pair.Value - 0.5, pair.Value + 0.5, labelText); 414 427 label.GridTicks = GridTickTypes.TickMark; … … 442 455 } 443 456 #endregion 444 445 private void sizeLabel_Click(object sender, EventArgs e) {446 447 }448 457 } 449 458 }
Note: See TracChangeset
for help on using the changeset viewer.