Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/02/15 17:00:02 (9 years ago)
Author:
mkommend
Message:

#2369: Fixed scaling of error characteristics curve.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs

    r12493 r12577  
    125125
    126126      var maxValue = residuals.Max();
    127       double scale = Math.Pow(10, Math.Floor(Math.Log10(maxValue)));
    128       var maximum = scale * (1 + (int)(maxValue / scale));
    129       chart.ChartAreas[0].AxisX.Maximum = maximum;
    130       chart.ChartAreas[0].CursorX.Interval = residuals.Min() / 100;
     127      if (maxValue >= chart.ChartAreas[0].AxisX.Maximum) {
     128        double scale = Math.Pow(10, Math.Floor(Math.Log10(maxValue)));
     129        var maximum = scale * (1 + (int)(maxValue / scale));
     130        chart.ChartAreas[0].AxisX.Maximum = maximum;
     131        chart.ChartAreas[0].CursorX.Interval = residuals.Min() / 100;
     132      }
    131133
    132134      UpdateSeries(residuals, solutionSeries);
     
    211213          .Where(x => x > 0) // remove entries where the original value is 0
    212214          .ToList();
    213       }
    214       // should never happen
    215       return new List<double>();
     215        default: throw new NotSupportedException();
     216      }
    216217    }
    217218
Note: See TracChangeset for help on using the changeset viewer.