Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/07/14 10:44:11 (10 years ago)
Author:
aesterer
Message:

Added coloring selection feature to line chart

Location:
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj

    r10786 r10803  
    7777    <Compile Include="Implementations\PreprocessingData.cs" />
    7878    <Compile Include="Implementations\DataGridLogic.cs" />
     79    <Compile Include="Implementations\PreprocessingDataTable.cs" />
    7980    <Compile Include="Interfaces\IFilteredPreprocessingData.cs" />
    8081    <Compile Include="PreprocessingTransformator.cs" />
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ChartLogic.cs

    r10736 r10803  
    3838    public DataRow CreateDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) {
    3939      IList<double> values = preprocessingData.GetValues<double>(variableName);
    40 
    41       //TODO: handle NAN values correctly
    42       // CalculateHistogram in DataTableView fails with NAN values ( Min(), Max() returns NAN)
    43       ReplayNANwithZero(values);
    4440      DataRow row = new DataRow(variableName, "", values);
    4541      row.VisualProperties.ChartType = chartType;
     
    4743    }
    4844
    49     private void ReplayNANwithZero(IList<double> values) {
     45    public DataRow CreateDataRowRange(string variableName,int start, int end, DataRowVisualProperties.DataRowChartType chartType) {
     46      IList<double> values = preprocessingData.GetValues<double>(variableName);
     47      IList<double> valuesRange = new List<double>();
     48      for (int i = 0; i < values.Count; i++) {
     49        if (i >= start && i <= end)
     50          valuesRange.Add(values[i]);
     51        else
     52          valuesRange.Add(Double.NaN);
     53      }
     54
     55      DataRow row = new DataRow(variableName, "", valuesRange);
     56      row.VisualProperties.ChartType = chartType;
     57      return row;
     58    }
     59
     60    private void ReplaceNANwithZero(IList<double> values) {
    5061      for (int i = 0; i < values.Count; i++) {
    5162        if (Double.IsNaN(values[i]))
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IChartLogic.cs

    r10733 r10803  
    3636    DataRow CreateDataRow(string variableName,DataRowVisualProperties.DataRowChartType chartType);
    3737
     38    DataRow CreateDataRowRange(string variableName, int start, int end, DataRowVisualProperties.DataRowChartType chartType);
     39
    3840    string GetVariableNameByIndex(int index);
    3941  }
Note: See TracChangeset for help on using the changeset viewer.