Changeset 3543 for trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs
- Timestamp:
- 04/27/10 13:33:41 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.