Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14473


Ignore:
Timestamp:
12/09/16 17:04:08 (7 years ago)
Author:
pfleck
Message:

#2709 Improved default y-axis for line charts.

Location:
branches/DataPreprocessing Enhancements
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/LineChartView.cs

    r14459 r14473  
    2828using HeuristicLab.Data;
    2929using HeuristicLab.MainForm;
     30using HeuristicLab.Visualization.ChartControlsExtensions;
    3031
    3132namespace HeuristicLab.DataPreprocessing.Views {
     
    7980    protected override DataTable CreateDataTable(string variableName) {
    8081      var dt = new DataTable();
    81       dt.Rows.Add(Content.CreateDataRow(variableName, DataRowVisualProperties.DataRowChartType.Line));
     82      var row = Content.CreateDataRow(variableName, DataRowVisualProperties.DataRowChartType.Line);
     83      dt.Rows.Add(row);
     84
     85      try {
     86        double axisMin, axisMax, axisInterval;
     87        ChartUtil.CalculateOptimalAxisInterval(row.Values.Min(), row.Values.Max(), out axisMin, out axisMax, out axisInterval);
     88        dt.VisualProperties.YAxisMinimumAuto = false;
     89        dt.VisualProperties.YAxisMaximumAuto = false;
     90        dt.VisualProperties.YAxisMinimumFixedValue = axisMin;
     91        dt.VisualProperties.YAxisMaximumFixedValue = axisMax;
     92      } catch (ArgumentOutOfRangeException) { } // missing values lead to NaNs
    8293      return dt;
    8394    }
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj

    r14472 r14473  
    7373  </PropertyGroup>
    7474  <ItemGroup>
     75    <Reference Include="HeuristicLab.Algorithms.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     76      <SpecificVersion>False</SpecificVersion>
     77      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.DataAnalysis-3.4.dll</HintPath>
     78    </Reference>
    7579    <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    7680      <SpecificVersion>False</SpecificVersion>
     
    114118      <SpecificVersion>False</SpecificVersion>
    115119      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath>
     120    </Reference>
     121    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     122      <SpecificVersion>False</SpecificVersion>
     123      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath>
     124    </Reference>
     125    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     126      <SpecificVersion>False</SpecificVersion>
     127      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.dll</HintPath>
    116128    </Reference>
    117129    <Reference Include="HeuristicLab.Visualization.ChartControlsExtensions-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
Note: See TracChangeset for help on using the changeset viewer.