Changeset 10914
- Timestamp:
- 05/28/14 15:29:38 (11 years ago)
- Location:
- branches/DataPreprocessing
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HistogramView.cs
r10908 r10914 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 using System; 2 22 using System.Windows.Forms; 3 23 using HeuristicLab.Analysis; … … 17 37 } 18 38 19 protected override void OnContentChanged() 20 { 39 protected override void OnContentChanged() { 21 40 base.OnContentChanged(); 22 if (Content != null) 23 { 41 if (Content != null) { 24 42 logic = Content.ChartLogic; 25 43 26 44 classifierComboBox.Items.Clear(); 27 45 classifierComboBox.Items.Add("None"); 28 46 29 foreach (string var in logic.GetVariableNamesForHistogramClassification()){47 foreach (string var in logic.GetVariableNamesForHistogramClassification()) { 30 48 classifierComboBox.Items.Add(var); 31 49 } 32 50 33 51 34 52 if (classifierComboBox.SelectedItem == null) { 35 53 classifierComboBox.SelectedIndex = Content.ClassifierVariableIndex; -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingDataTableView.cs
r10908 r10914 33 33 using HeuristicLab.Analysis.Views; 34 34 35 namespace HeuristicLab.DataPreprocessing.Views 36 { 35 namespace HeuristicLab.DataPreprocessing.Views { 37 36 [View("Preprocessing DataTable View")] 38 37 [Content(typeof(PreprocessingDataTable), false)] 39 public partial class PreprocessingDataTableView : ItemView, IConfigureableView 40 { 38 public partial class PreprocessingDataTableView : ItemView, IConfigureableView { 41 39 protected List<Series> invisibleSeries; 42 40 protected Dictionary<IObservableList<double>, DataRow> valuesRowsTable; 43 41 44 public new PreprocessingDataTable Content 45 { 42 public new PreprocessingDataTable Content { 46 43 get { return (PreprocessingDataTable)base.Content; } 47 44 set { base.Content = value; } … … 50 47 public IEnumerable<double> Classification { get; set; } 51 48 52 public PreprocessingDataTableView() 53 { 49 public PreprocessingDataTableView() { 54 50 InitializeComponent(); 55 51 valuesRowsTable = new Dictionary<IObservableList<double>, DataRow>(); … … 60 56 61 57 #region Event Handler Registration 62 protected override void DeregisterContentEvents() 63 { 58 protected override void DeregisterContentEvents() { 64 59 foreach (DataRow row in Content.Rows) 65 60 DeregisterDataRowEvents(row); … … 76 71 base.DeregisterContentEvents(); 77 72 } 78 protected override void RegisterContentEvents() 79 { 73 protected override void RegisterContentEvents() { 80 74 base.RegisterContentEvents(); 81 75 Content.VisualPropertiesChanged += new EventHandler(Content_VisualPropertiesChanged); … … 102 96 row.Values.CollectionReset += new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_CollectionReset); 103 97 } 104 protected virtual void DeregisterDataRowEvents(DataRow row) 105 { 98 protected virtual void DeregisterDataRowEvents(DataRow row) { 106 99 row.Values.ItemsAdded -= new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsAdded); 107 100 row.Values.ItemsRemoved -= new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsRemoved); … … 122 115 chart.ChartAreas[0].AxisY2.Title = string.Empty; 123 116 chart.Series.Clear(); 124 if (Content != null) 125 { 117 if (Content != null) { 126 118 127 119 if (Classification != null) … … 135 127 } 136 128 137 protected override void SetEnabledStateOfControls() 138 { 129 protected override void SetEnabledStateOfControls() { 139 130 base.SetEnabledStateOfControls(); 140 131 chart.Enabled = Content != null; 141 132 } 142 133 143 public void ShowConfiguration() 144 { 145 if (Content != null) 146 { 147 using (var dialog = new DataTableVisualPropertiesDialog(Content)) 148 { 134 public void ShowConfiguration() { 135 if (Content != null) { 136 using (var dialog = new DataTableVisualPropertiesDialog(Content)) { 149 137 dialog.ShowDialog(this); 150 138 } 151 } 152 else MessageBox.Show("Nothing to configure."); 153 } 154 protected virtual void AddDataRows(IEnumerable<DataRow> rows) 155 { 156 foreach (var row in rows) 157 { 139 } else MessageBox.Show("Nothing to configure."); 140 } 141 142 protected virtual void AddDataRows(IEnumerable<DataRow> rows) { 143 foreach (var row in rows) { 158 144 RegisterDataRowEvents(row); 159 145 var series = new Series(row.Name); … … 175 161 176 162 // only paint selection for line chart 177 if (rows.Count() > 0 && rows.ElementAt(0).VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Line) 178 { 163 if (rows.Count() > 0 && rows.ElementAt(0).VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Line) { 179 164 // add dummy series for selction entry in legend 180 165 if (rows.Count() > 0 && chart.Series.FindByName("(Selection)") == null) { 181 Series series = new Series("(Selection)");182 series.IsVisibleInLegend = true;183 series.Color = Color.Green;184 series.BorderWidth = 1;185 series.BorderDashStyle = ChartDashStyle.Solid;186 series.BorderColor = Color.Empty;187 series.ChartType = SeriesChartType.FastLine;188 chart.Series.Add(series);189 }190 191 foreach (var row in rows) {166 Series series = new Series("(Selection)"); 167 series.IsVisibleInLegend = true; 168 series.Color = Color.Green; 169 series.BorderWidth = 1; 170 series.BorderDashStyle = ChartDashStyle.Solid; 171 series.BorderColor = Color.Empty; 172 series.ChartType = SeriesChartType.FastLine; 173 chart.Series.Add(series); 174 } 175 176 foreach (var row in rows) { 192 177 row.VisualProperties.IsVisibleInLegend = false; 193 178 row.VisualProperties.Color = Color.Green; … … 197 182 FillSeriesWithRowValues(series, row); 198 183 199 if (Classification == null) 184 if (Classification == null) 200 185 chart.Series.Add(series); 201 202 }203 }186 187 } 188 } 204 189 } 205 190 … … 207 192 208 193 // only remove selection for line chart 209 if (rows.Count() > 0 && rows.ElementAt(0).VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Line) 210 { 211 //remove selection entry in legend 212 if (Content.SelectedRows.Count == 0) { 213 Series series = chart.Series["(Selection)"]; 214 chart.Series.Remove(series); 215 } 216 217 foreach (var row in rows) { 218 Series series = chart.Series[row.Name + "(Selected)"]; 219 chart.Series.Remove(series); 220 } 221 } 194 if (rows.Count() > 0 && rows.ElementAt(0).VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Line) { 195 //remove selection entry in legend 196 if (Content.SelectedRows.Count == 0) { 197 Series series = chart.Series["(Selection)"]; 198 chart.Series.Remove(series); 199 } 200 201 foreach (var row in rows) { 202 Series series = chart.Series[row.Name + "(Selected)"]; 203 chart.Series.Remove(series); 204 } 205 } 222 206 } 223 207 … … 233 217 } 234 218 235 private void ConfigureSeries(Series series, DataRow row) 236 { 219 private void ConfigureSeries(Series series, DataRow row) { 237 220 RemoveCustomPropertyIfExists(series, "PointWidth"); 238 221 series.BorderWidth = 1; … … 255 238 if (!chart.Series.Any(x => x.ChartType != SeriesChartType.Bar && x.ChartType != SeriesChartType.StackedBar && x.ChartType != SeriesChartType.StackedBar100)) 256 239 series.ChartType = SeriesChartType.Bar; 257 else 258 { 240 else { 259 241 series.ChartType = SeriesChartType.FastPoint; //default 260 242 row.VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Points; … … 300 282 } 301 283 302 private void ConfigureChartArea(ChartArea area) 303 { 284 private void ConfigureChartArea(ChartArea area) { 304 285 if (Content.VisualProperties.TitleFont != null) chart.Titles[0].Font = Content.VisualProperties.TitleFont; 305 286 if (!Content.VisualProperties.TitleColor.IsEmpty) chart.Titles[0].ForeColor = Content.VisualProperties.TitleColor; … … 328 309 } 329 310 330 private void RecalculateAxesScale(ChartArea area) 331 { 311 private void RecalculateAxesScale(ChartArea area) { 332 312 // Reset the axes bounds so that RecalculateAxesScale() will assign new bounds 333 foreach (Axis a in area.Axes) 334 { 313 foreach (Axis a in area.Axes) { 335 314 a.Minimum = double.NaN; 336 315 a.Maximum = double.NaN; … … 354 333 } 355 334 356 protected virtual void UpdateYCursorInterval() 357 { 335 protected virtual void UpdateYCursorInterval() { 358 336 double interestingValuesRange = ( 359 337 from series in chart.Series … … 374 352 #region Event Handlers 375 353 #region Content Event Handlers 376 private void Content_VisualPropertiesChanged(object sender, EventArgs e) 377 { 354 private void Content_VisualPropertiesChanged(object sender, EventArgs e) { 378 355 if (InvokeRequired) 379 356 Invoke(new EventHandler(Content_VisualPropertiesChanged), sender, e); 380 else 381 { 357 else { 382 358 ConfigureChartArea(chart.ChartAreas[0]); 383 359 RecalculateAxesScale(chart.ChartAreas[0]); // axes min/max could have changed … … 425 401 if (InvokeRequired) 426 402 Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsAdded), sender, e); 427 else 428 { 403 else { 429 404 AddDataRows(e.Items); 430 405 } 431 406 } 432 private void Rows_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<DataRow> e) 433 { 407 private void Rows_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<DataRow> e) { 434 408 if (InvokeRequired) 435 409 Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsRemoved), sender, e); 436 else 437 { 410 else { 438 411 RemoveDataRows(e.Items); 439 412 } 440 413 } 441 private void Rows_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<DataRow> e) 442 { 414 private void Rows_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<DataRow> e) { 443 415 if (InvokeRequired) 444 416 Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsReplaced), sender, e); 445 else 446 { 417 else { 447 418 RemoveDataRows(e.OldItems); 448 419 AddDataRows(e.Items); 449 420 } 450 421 } 451 private void Rows_CollectionReset(object sender, CollectionItemsChangedEventArgs<DataRow> e) 452 { 422 private void Rows_CollectionReset(object sender, CollectionItemsChangedEventArgs<DataRow> e) { 453 423 if (InvokeRequired) 454 424 Invoke(new CollectionItemsChangedEventHandler<DataRow>(Rows_CollectionReset), sender, e); 455 else 456 { 425 else { 457 426 RemoveDataRows(e.OldItems); 458 427 AddDataRows(e.Items); … … 461 430 #endregion 462 431 #region Row Event Handlers 463 private void Row_VisualPropertiesChanged(object sender, EventArgs e) 464 { 432 private void Row_VisualPropertiesChanged(object sender, EventArgs e) { 465 433 if (InvokeRequired) 466 434 Invoke(new EventHandler(Row_VisualPropertiesChanged), sender, e); 467 else 468 { 435 else { 469 436 DataRow row = (DataRow)sender; 470 437 Series series = chart.Series[row.Name]; … … 475 442 } 476 443 } 477 private void Row_NameChanged(object sender, EventArgs e) 478 { 444 private void Row_NameChanged(object sender, EventArgs e) { 479 445 if (InvokeRequired) 480 446 Invoke(new EventHandler(Row_NameChanged), sender, e); 481 else 482 { 447 else { 483 448 DataRow row = (DataRow)sender; 484 449 chart.Series[row.Name].Name = row.Name; … … 487 452 #endregion 488 453 #region Values Event Handlers 489 private void Values_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) 490 { 454 private void Values_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) { 491 455 if (InvokeRequired) 492 456 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsAdded), sender, e); 493 else 494 { 457 else { 495 458 DataRow row = null; 496 459 valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row); 497 if (row != null) 498 { 460 if (row != null) { 499 461 Series rowSeries = chart.Series[row.Name]; 500 if (!invisibleSeries.Contains(rowSeries)) 501 { 462 if (!invisibleSeries.Contains(rowSeries)) { 502 463 rowSeries.Points.Clear(); 503 464 FillSeriesWithRowValues(rowSeries, row); … … 508 469 } 509 470 } 510 private void Values_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) 511 { 471 private void Values_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) { 512 472 if (InvokeRequired) 513 473 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsRemoved), sender, e); 514 else 515 { 474 else { 516 475 DataRow row = null; 517 476 valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row); 518 if (row != null) 519 { 477 if (row != null) { 520 478 Series rowSeries = chart.Series[row.Name]; 521 if (!invisibleSeries.Contains(rowSeries)) 522 { 479 if (!invisibleSeries.Contains(rowSeries)) { 523 480 rowSeries.Points.Clear(); 524 481 FillSeriesWithRowValues(rowSeries, row); … … 529 486 } 530 487 } 531 private void Values_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) 532 { 488 private void Values_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) { 533 489 if (InvokeRequired) 534 490 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsReplaced), sender, e); 535 else 536 { 491 else { 537 492 DataRow row = null; 538 493 valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row); 539 if (row != null) 540 { 494 if (row != null) { 541 495 Series rowSeries = chart.Series[row.Name]; 542 if (!invisibleSeries.Contains(rowSeries)) 543 { 544 if (row.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Histogram) 545 { 496 if (!invisibleSeries.Contains(rowSeries)) { 497 if (row.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Histogram) { 546 498 rowSeries.Points.Clear(); 547 499 FillSeriesWithRowValues(rowSeries, row); 548 } 549 else 550 { 551 foreach (IndexedItem<double> item in e.Items) 552 { 500 } else { 501 foreach (IndexedItem<double> item in e.Items) { 553 502 if (IsInvalidValue(item.Value)) 554 503 rowSeries.Points[item.Index].IsEmpty = true; 555 else 556 { 504 else { 557 505 rowSeries.Points[item.Index].YValues = new double[] { item.Value }; 558 506 rowSeries.Points[item.Index].IsEmpty = false; … … 566 514 } 567 515 } 568 private void Values_ItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) 569 { 516 private void Values_ItemsMoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) { 570 517 if (InvokeRequired) 571 518 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_ItemsMoved), sender, e); 572 else 573 { 519 else { 574 520 DataRow row = null; 575 521 valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row); 576 if (row != null) 577 { 522 if (row != null) { 578 523 Series rowSeries = chart.Series[row.Name]; 579 if (!invisibleSeries.Contains(rowSeries)) 580 { 524 if (!invisibleSeries.Contains(rowSeries)) { 581 525 rowSeries.Points.Clear(); 582 526 FillSeriesWithRowValues(rowSeries, row); … … 588 532 } 589 533 590 private void Values_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) 591 { 534 private void Values_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<double>> e) { 592 535 if (InvokeRequired) 593 536 Invoke(new CollectionItemsChangedEventHandler<IndexedItem<double>>(Values_CollectionReset), sender, e); 594 else 595 { 537 else { 596 538 DataRow row = null; 597 539 valuesRowsTable.TryGetValue((IObservableList<double>)sender, out row); 598 if (row != null) 599 { 540 if (row != null) { 600 541 Series rowSeries = chart.Series[row.Name]; 601 if (!invisibleSeries.Contains(rowSeries)) 602 { 542 if (!invisibleSeries.Contains(rowSeries)) { 603 543 rowSeries.Points.Clear(); 604 544 FillSeriesWithRowValues(rowSeries, row); … … 613 553 614 554 #region Chart Event Handlers 615 private void chart_MouseDown(object sender, MouseEventArgs e) 616 { 555 private void chart_MouseDown(object sender, MouseEventArgs e) { 617 556 HitTestResult result = chart.HitTest(e.X, e.Y); 618 if (result.ChartElementType == ChartElementType.LegendItem) 619 { 557 if (result.ChartElementType == ChartElementType.LegendItem) { 620 558 ToggleSeriesVisible(result.Series); 621 559 } 622 560 } 623 private void chart_MouseMove(object sender, MouseEventArgs e) 624 { 561 private void chart_MouseMove(object sender, MouseEventArgs e) { 625 562 HitTestResult result = chart.HitTest(e.X, e.Y); 626 563 if (result.ChartElementType == ChartElementType.LegendItem) … … 629 566 this.Cursor = Cursors.Default; 630 567 } 631 private void chart_CustomizeLegend(object sender, CustomizeLegendEventArgs e) 632 { 633 foreach (LegendItem legendItem in e.LegendItems) 634 { 568 private void chart_CustomizeLegend(object sender, CustomizeLegendEventArgs e) { 569 foreach (LegendItem legendItem in e.LegendItems) { 635 570 var series = chart.Series[legendItem.SeriesName]; 636 if (series != null) 637 { 571 if (series != null) { 638 572 bool seriesIsInvisible = invisibleSeries.Contains(series); 639 foreach (LegendCell cell in legendItem.Cells) 640 { 573 foreach (LegendCell cell in legendItem.Cells) { 641 574 cell.ForeColor = seriesIsInvisible ? Color.Gray : Color.Black; 642 575 } … … 646 579 #endregion 647 580 648 private void ToggleSeriesVisible(Series series) 649 { 581 private void ToggleSeriesVisible(Series series) { 650 582 651 583 if (!Content.Rows.Any(x => x.Name == series.Name)) 652 584 return; 653 585 654 if (!invisibleSeries.Contains(series)) 655 { 586 if (!invisibleSeries.Contains(series)) { 656 587 series.Points.Clear(); 657 588 invisibleSeries.Add(series); 658 } 659 else 660 { 589 } else { 661 590 invisibleSeries.Remove(series); 662 if (Content != null) 663 { 591 if (Content != null) { 664 592 665 593 var row = (from r in Content.Rows … … 674 602 } 675 603 676 private void FillSeriesWithRowValues(Series series, DataRow row) 677 { 678 switch (row.VisualProperties.ChartType) 679 { 604 private void FillSeriesWithRowValues(Series series, DataRow row) { 605 switch (row.VisualProperties.ChartType) { 680 606 case DataRowVisualProperties.DataRowChartType.Histogram: 681 607 CalculateHistogram(series, row); 682 608 break; 683 default: 684 { 609 default: { 685 610 bool yLogarithmic = series.YAxisType == AxisType.Primary 686 611 ? Content.VisualProperties.YAxisLogScale … … 689 614 ? Content.VisualProperties.XAxisLogScale 690 615 : Content.VisualProperties.SecondXAxisLogScale; 691 for (int i = 0; i < row.Values.Count; i++) 692 { 616 for (int i = 0; i < row.Values.Count; i++) { 693 617 var value = row.Values[i]; 694 618 var point = new DataPoint(); … … 709 633 double min = Double.MaxValue; 710 634 711 foreach (double value in values) 712 { 635 foreach (double value in values) { 713 636 if (!Double.IsNaN(value) && value < min) 714 637 min = value; … … 718 641 719 642 //get maximium ignores nan values 720 private double GetMaximum(IEnumerable<double> values) 721 { 643 private double GetMaximum(IEnumerable<double> values) { 722 644 double max = Double.MinValue; 723 645 724 foreach (double value in values) 725 { 646 foreach (double value in values) { 726 647 if (!Double.IsNaN(value) && value > max) 727 648 max = value; … … 765 686 double intervalWidth = (maxValue - minValue) / bins; 766 687 if (intervalWidth < 0) return; 767 if (intervalWidth == 0) 768 { 688 if (intervalWidth == 0) { 769 689 series.Points.AddXY(minValue, row.Values.Count); 770 690 return; … … 818 738 // add data points 819 739 int j = 0; 820 foreach (var d in doubleRange) 821 { 740 foreach (var d in doubleRange) { 822 741 double sum = 0.0; 823 742 // sum the frequency values that fall within the same interval 824 while (j < valueFrequencies.Count && valueFrequencies[j].Item1 < d) 825 { 743 while (j < valueFrequencies.Count && valueFrequencies[j].Item1 < d) { 826 744 sum += valueFrequencies[j].Item2; 827 745 ++j; … … 833 751 ? "Y" 834 752 : Content.VisualProperties.YAxisTitle; 835 series.Points.Add(new DataPoint(d - intervalCenter, sum) 836 { 753 series.Points.Add(new DataPoint(d - intervalCenter, sum) { 837 754 ToolTip = 838 755 xAxisTitle + ": [" + (d - intervalWidth) + "-" + d + ")" + Environment.NewLine + … … 843 760 844 761 #region Helpers 845 public static IEnumerable<double> DoubleRange(double min, double max, double step) 846 { 762 public static IEnumerable<double> DoubleRange(double min, double max, double step) { 847 763 double i; 848 764 for (i = min; i <= max; i += step) … … 853 769 } 854 770 855 protected void RemoveCustomPropertyIfExists(Series series, string property) 856 { 771 protected void RemoveCustomPropertyIfExists(Series series, string property) { 857 772 if (series.IsCustomPropertySet(property)) series.DeleteCustomProperty(property); 858 773 } 859 774 860 private double HumanRoundRange(double range) 861 { 775 private double HumanRoundRange(double range) { 862 776 double base10 = Math.Pow(10.0, Math.Floor(Math.Log10(range))); 863 777 double rounding = range / base10; … … 870 784 } 871 785 872 private double HumanRoundMax(double max) 873 { 786 private double HumanRoundMax(double max) { 874 787 double base10; 875 788 if (max > 0) base10 = Math.Pow(10.0, Math.Floor(Math.Log10(max))); … … 880 793 } 881 794 882 private ChartDashStyle ConvertLineStyle(DataRowVisualProperties.DataRowLineStyle dataRowLineStyle) 883 { 884 switch (dataRowLineStyle) 885 { 795 private ChartDashStyle ConvertLineStyle(DataRowVisualProperties.DataRowLineStyle dataRowLineStyle) { 796 switch (dataRowLineStyle) { 886 797 case DataRowVisualProperties.DataRowLineStyle.Dash: 887 798 return ChartDashStyle.Dash; … … 901 812 } 902 813 903 protected static bool IsInvalidValue(double x) 904 { 814 protected static bool IsInvalidValue(double x) { 905 815 return double.IsNaN(x) || x < (double)decimal.MinValue || x > (double)decimal.MaxValue; 906 816 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/CorrelationMatrixContent.cs
r10908 r10914 28 28 29 29 [Item("Feature Correlation Matrix", "Represents the feature correlation matrix.")] 30 public class CorrelationMatrixContent : Item, IViewShortcut 31 { 30 public class CorrelationMatrixContent : Item, IViewShortcut { 32 31 public DataAnalysisProblemData ProblemData { get; set; } 33 32 … … 38 37 public CorrelationMatrixContent(CorrelationMatrixContent original, Cloner cloner) 39 38 : base(original, cloner) { 40 39 41 40 } 42 41 43 42 public static new Image StaticItemImage { 44 43 get { return HeuristicLab.Common.Resources.VSImageLibrary.Gradient; } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/HistogramContent.cs
r10908 r10914 30 30 private int classifierVariableIndex = 0; 31 31 32 public HistogramContent(IChartLogic chartlogic) :base(chartlogic) { 32 public HistogramContent(IChartLogic chartlogic) 33 : base(chartlogic) { 33 34 AllInOneMode = false; 34 35 } … … 38 39 } 39 40 40 public int ClassifierVariableIndex 41 { 41 public int ClassifierVariableIndex { 42 42 get { return this.classifierVariableIndex; } 43 43 set { this.classifierVariableIndex = value; }
Note: See TracChangeset
for help on using the changeset viewer.