Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/24/17 09:51:10 (7 years ago)
Author:
abeham
Message:

#2457: merged trunk into branch

Location:
branches/PerformanceComparison/HeuristicLab.Analysis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.Analysis

  • branches/PerformanceComparison/HeuristicLab.Analysis/3.3/DataVisualization/DataTable.cs

    r14600 r15282  
    112112      if (VisualProperties == null) VisualProperties = new DataTableVisualProperties(name);
    113113      if (VisualProperties.Title == null) VisualProperties.Title = name;
     114
     115      #region Backwards Compatability Histogram Visual Properties
     116      var rowProperties = Rows.Select(r => r.VisualProperties).ToList();
     117      if (rowProperties.Any(r => r.Bins.HasValue))
     118        VisualProperties.HistogramBins = rowProperties.Where(r => r.Bins.HasValue).Max(r => r.Bins.Value);
     119      if (rowProperties.Any(r => r.ExactBins.HasValue))
     120        VisualProperties.HistogramExactBins = rowProperties.Where(r => r.ExactBins.HasValue).Any(r => r.ExactBins.Value);
     121      if (rowProperties.Any(r => r.Aggregation.HasValue)) {
     122        var maxOccurrence = rowProperties
     123          .Where(r => r.Aggregation.HasValue).Select(r => r.Aggregation.Value)
     124          .GroupBy(x => x).OrderByDescending(x => x.Count())
     125          .First().Key;
     126        VisualProperties.HistogramAggregation = (DataTableVisualProperties.DataTableHistogramAggregation)maxOccurrence;
     127      }
     128      #endregion
    114129    }
    115130    #endregion
Note: See TracChangeset for help on using the changeset viewer.