Changeset 16956 for branches/2457_ExpertSystem/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs
- Timestamp:
- 05/15/19 13:36:51 (6 years ago)
- Location:
- branches/2457_ExpertSystem/HeuristicLab.Optimization.Views
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2457_ExpertSystem/HeuristicLab.Optimization.Views
- Property svn:mergeinfo changed
-
branches/2457_ExpertSystem/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs
r15282 r16956 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 24 24 using System.ComponentModel; 25 25 using System.Drawing; 26 using System.Globalization; 26 27 using System.Linq; 27 28 using System.Windows.Forms; … … 443 444 IntValue intValue = value as IntValue; 444 445 TimeSpanValue timeSpanValue = value as TimeSpanValue; 446 DateTimeValue dateTimeValue = value as DateTimeValue; 445 447 double? ret = null; 446 448 if (doubleValue != null) { … … 451 453 else if (timeSpanValue != null) { 452 454 ret = timeSpanValue.Value.TotalSeconds; 455 } else if (dateTimeValue != null) { 456 ret = dateTimeValue.Value.ToOADate(); 453 457 } else { 454 458 int columnIndex = Matrix.ColumnNames.ToList().IndexOf(columnName); … … 531 535 int axisDimensionCount = Enum.GetNames(typeof(AxisDimension)).Count(); 532 536 int columnIndex = xAxisComboBox.SelectedIndex - axisDimensionCount; 533 if (columnIndex >= 0 && Content.GetValue(0, columnIndex) is TimeSpanValue) 534 this.chart.ChartAreas[0].CursorX.Interval = 1; 537 if (columnIndex >= 0) { 538 var value = Content.GetValue(0, columnIndex); 539 if (value is TimeSpanValue || value is DateTimeValue) 540 this.chart.ChartAreas[0].CursorX.Interval = 1; 541 } 535 542 columnIndex = yAxisComboBox.SelectedIndex - axisDimensionCount; 536 if (columnIndex >= 0 && Content.GetValue(0, columnIndex) is TimeSpanValue) 537 this.chart.ChartAreas[0].CursorY.Interval = 1; 543 if (columnIndex >= 0) { 544 var value = Content.GetValue(0, columnIndex); 545 if (value is TimeSpanValue || value is DateTimeValue) 546 this.chart.ChartAreas[0].CursorY.Interval = 1; 547 } 538 548 } 539 549 … … 734 744 axis.CustomLabels.Add(i - axis.LabelStyle.Interval / 2, i + axis.LabelStyle.Interval / 2, x); 735 745 } 746 } else if (dimension > 0 && Content.GetValue(0, dimension) is DateTimeValue) { 747 this.chart.ChartAreas[0].RecalculateAxesScale(); 748 for (double i = axis.Minimum; i <= axis.Maximum; i += axis.LabelStyle.Interval) { 749 DateTime dt = DateTime.FromOADate(i); 750 string x = dt.ToString(CultureInfo.CurrentCulture); 751 axis.CustomLabels.Add(i - axis.LabelStyle.Interval / 2, i + axis.LabelStyle.Interval / 2, x); 752 } 736 753 } 737 754 }
Note: See TracChangeset
for help on using the changeset viewer.