Changeset 4212
- Timestamp:
- 08/13/10 13:08:35 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionBubbleChartView.cs
r4209 r4212 431 431 } 432 432 } 433 433 434 string newTooltipText = string.Empty; 434 435 string oldTooltipText; … … 436 437 IRun run = (IRun)((DataPoint)h.Object).Tag; 437 438 newTooltipText = BuildTooltip(run); 439 } else if (h.ChartElementType == ChartElementType.AxisLabels) { 440 newTooltipText = ((CustomLabel)h.Object).ToolTip; 438 441 } 439 442 … … 460 463 if (xValue.HasValue && columnIndex > 0 && Content.GetValue(0, columnIndex) is TimeSpanValue) { 461 464 TimeSpan time = TimeSpan.FromSeconds(xValue.Value); 462 xString = string.Format("{0:00}:{1:00}:{2:00.00}", (int)time.TotalHours, time.Minutes, time. TotalSeconds);465 xString = string.Format("{0:00}:{1:00}:{2:00.00}", (int)time.TotalHours, time.Minutes, time.Seconds); 463 466 } 464 467 columnIndex = yAxisComboBox.SelectedIndex - axisDimensionCount; 465 468 if (yValue.HasValue && columnIndex > 0 && Content.GetValue(0, columnIndex) is TimeSpanValue) { 466 469 TimeSpan time = TimeSpan.FromSeconds(yValue.Value); 467 yString = string.Format("{0:00}:{1:00}:{2:00.00}", (int)time.TotalHours, time.Minutes, time. TotalSeconds);470 yString = string.Format("{0:00}:{1:00}:{2:00.00}", (int)time.TotalHours, time.Minutes, time.Seconds); 468 471 } 469 472 … … 512 515 axis.CustomLabels.Clear(); 513 516 if (categoricalMapping.ContainsKey(dimension)) { 514 CustomLabel label = null;515 517 foreach (var pair in categoricalMapping[dimension]) { 516 518 string labelText = pair.Key.ToString(); 519 CustomLabel label = new CustomLabel(); 520 label.ToolTip = labelText; 517 521 if (labelText.Length > 25) 518 522 labelText = labelText.Substring(0, 25) + " ... "; 519 label = axis.CustomLabels.Add(pair.Value - 0.5, pair.Value + 0.5, labelText);523 label.Text = labelText; 520 524 label.GridTicks = GridTickTypes.TickMark; 521 } 522 axis.IsLabelAutoFit = false; 523 axis.LabelStyle.Enabled = true; 524 axis.LabelStyle.Angle = 0; 525 axis.LabelStyle.TruncatedLabels = true; 525 label.FromPosition = pair.Value - 0.5; 526 label.ToPosition = pair.Value + 0.5; 527 axis.CustomLabels.Add(label); 528 } 526 529 } else if (dimension > 0 && Content.GetValue(0, dimension) is TimeSpanValue) { 527 530 this.chart.ChartAreas[0].RecalculateAxesScale();
Note: See TracChangeset
for help on using the changeset viewer.