Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/22/14 16:32:24 (11 years ago)
Author:
aesterer
Message:

Added variable selection in line chart

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/LineChartLogic.cs

    r10377 r10382  
    77namespace HeuristicLab.DataPreprocessing
    88{
    9   public class LineChartLogic:ILineChartLogic
     9  public class LineChartLogic : ILineChartLogic
    1010  {
    1111    private IPreprocessingData preprocessingData;
     12    private DataTable dataTable;
    1213
    1314    public LineChartLogic(IPreprocessingData preprocessingData) {
    1415      this.preprocessingData = preprocessingData;
    15  
     16      dataTable = new DataTable("LineChart");
     17      FillDataTable();
    1618    }
    1719
    18     public void FillDataTable(DataTable dataTable) {
     20    private void FillDataTable() {
    1921      IEnumerable<string> variableNames = preprocessingData.VariableNames;
    2022
     
    2729 
    2830    }
     31
     32    public IEnumerable<object> GetVariableNames()
     33    {
     34      return preprocessingData.VariableNames;
     35    }
     36
     37    public DataTable GetDataTable()
     38    {
     39      return dataTable;
     40    }
     41
     42
     43    #region ILineChartLogic Members
     44
     45    public void RemoveVariable(string name) {
     46      dataTable.Rows.Remove(name);
     47    }
     48
     49    public void AddVariable(string name) {
     50      IList<double> values = preprocessingData.GetValues<double>(name);
     51      DataRow row = new DataRow(name, "", values);
     52      dataTable.Rows.Add(row);
     53    }
     54
     55    #endregion
     56
     57    public bool VariableIsDisplayed(string name) {
     58
     59      foreach (var item in dataTable.Rows) {
     60         if(item.Name == name)
     61           return true;
     62      }
     63      return false;
     64    }
     65
    2966  }
    3067}
Note: See TracChangeset for help on using the changeset viewer.