Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3495


Ignore:
Timestamp:
04/22/10 20:39:46 (15 years ago)
Author:
gkronber
Message:

Added filtering of extreme values to DataTableView #920

File:
1 edited

Legend:

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

    r3454 r3495  
    119119      series.ToolTip = "#VAL";
    120120      for (int i = 0; i < row.Values.Count; i++) {
    121         if (double.IsNaN(row.Values[i])) {
     121        var value = row.Values[i];
     122        if (double.IsNaN(value) || value < (double)decimal.MinValue || value > (double)decimal.MaxValue) {
    122123          DataPoint point = new DataPoint();
    123124          point.IsEmpty = true;
    124125          series.Points.Add(point);
    125126        } else {
    126           series.Points.Add(row.Values[i]);
     127          series.Points.Add(value);
    127128        }
    128129      }
     
    223224        DataRow row = valuesRowsTable[(IObservableList<double>)sender];
    224225        foreach (IndexedItem<double> item in e.Items) {
    225           if (double.IsNaN(item.Value)) {
     226          var value = item.Value;
     227          if (double.IsNaN(value) || value < (double)decimal.MinValue || value > (double)decimal.MaxValue) {
    226228            DataPoint point = new DataPoint();
    227229            point.IsEmpty = true;
    228230            chart.Series[row.Name].Points.Insert(item.Index, point);
    229231          } else {
    230             chart.Series[row.Name].Points.InsertY(item.Index, item.Value);
     232            chart.Series[row.Name].Points.InsertY(item.Index, value);
    231233          }
    232234        }
Note: See TracChangeset for help on using the changeset viewer.