Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/09/11 17:15:58 (12 years ago)
Author:
bburlacu
Message:

#1661: Added SymbolicExpressionTreeLengthAnalyzer. Added new scalingFactory visual property for table data rows (for dynamically adjusting the histogram scale depending on the number of bins) + scaling logic inside the tree length analyzer, adjusted DataTableView.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableView.cs

    r6676 r6978  
    576576      }
    577577
    578       double current = minValue, intervalCenter = intervalWidth / 2.0;
     578      var area = chart.ChartAreas[0];
     579      double current = 0.0;
     580      if (!Double.IsNaN(Content.VisualProperties.XAxisMinimumFixedValue) && !Content.VisualProperties.XAxisMinimumAuto)
     581        current = Content.VisualProperties.XAxisMinimumFixedValue;
     582      else current = minValue;
     583
     584      area.AxisX.Interval = intervalWidth / row.VisualProperties.ScaleFactor;
     585      area.AxisX.IntervalOffset = intervalWidth / row.VisualProperties.ScaleFactor;
     586
     587      series.SetCustomProperty("PointWidth", intervalWidth.ToString());
     588
    579589      int frequency = 0;
    580       series.Points.AddXY(current - intervalCenter, 0); // so that the first column is not visually truncated
    581590      foreach (double v in row.Values.Where(x => !IsInvalidValue(x)).OrderBy(x => x)) {
    582591        while (v > current + intervalWidth) {
    583           series.Points.AddXY(current + intervalCenter, frequency);
     592          series.Points.AddXY(current + intervalWidth, frequency);
    584593          current += intervalWidth;
    585594          frequency = 0;
     
    587596        frequency++;
    588597      }
    589       series.Points.AddXY(current + intervalCenter, frequency);
    590       series.Points.AddXY(current + 3 * intervalCenter, 0); // so that the last column is not visually truncated
     598      series.Points.AddXY(current + intervalWidth, frequency);
    591599    }
    592600
Note: See TracChangeset for help on using the changeset viewer.