Changeset 14583


Ignore:
Timestamp:
01/18/17 13:44:34 (3 years ago)
Author:
pfleck
Message:

#2709

  • Added histogram aggregation option.
  • Show all columns in data grid per default.
Location:
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4
Files:
3 edited

Legend:

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

    r14546 r14583  
    7070      List<KeyValuePair<int, SortOrder>> order = new List<KeyValuePair<int, SortOrder>>(base.sortedColumnIndices);
    7171      base.OnContentChanged();
    72 
    73       foreach (DataGridViewColumn column in DataGridView.Columns) {
    74         var variable = column.HeaderText;
    75         bool isInputTarget = Content.PreProcessingData.InputVariables.Contains(variable)
    76           || Content.PreProcessingData.TargetVariable == variable;
    77         column.Visible = isInputTarget;
    78       }
    7972
    8073      DataGridView.RowHeadersWidth = 70;
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.Designer.cs

    r14578 r14583  
    4646    private void InitializeComponent() {
    4747      this.optionsBox = new System.Windows.Forms.GroupBox();
     48      this.label2 = new System.Windows.Forms.Label();
    4849      this.label1 = new System.Windows.Forms.Label();
     50      this.aggregationComboBox = new System.Windows.Forms.ComboBox();
    4951      this.classifierComboBox = new System.Windows.Forms.ComboBox();
    5052      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
     
    6365      // optionsBox
    6466      //
     67      this.optionsBox.Controls.Add(this.label2);
    6568      this.optionsBox.Controls.Add(this.label1);
     69      this.optionsBox.Controls.Add(this.aggregationComboBox);
    6670      this.optionsBox.Controls.Add(this.classifierComboBox);
    6771      this.optionsBox.Dock = System.Windows.Forms.DockStyle.Bottom;
    68       this.optionsBox.Location = new System.Drawing.Point(0, 334);
     72      this.optionsBox.Location = new System.Drawing.Point(0, 292);
    6973      this.optionsBox.Name = "optionsBox";
    70       this.optionsBox.Size = new System.Drawing.Size(180, 69);
     74      this.optionsBox.Size = new System.Drawing.Size(180, 111);
    7175      this.optionsBox.TabIndex = 7;
    7276      this.optionsBox.TabStop = false;
    73       this.optionsBox.Text = "Options";
     77      this.optionsBox.Text = "Grouping Options";
     78      //
     79      // label2
     80      //
     81      this.label2.AutoSize = true;
     82      this.label2.Location = new System.Drawing.Point(2, 61);
     83      this.label2.Name = "label2";
     84      this.label2.Size = new System.Drawing.Size(67, 13);
     85      this.label2.TabIndex = 2;
     86      this.label2.Text = "Aggregation:";
    7487      //
    7588      // label1
     
    7891      this.label1.Location = new System.Drawing.Point(3, 15);
    7992      this.label1.Name = "label1";
    80       this.label1.Size = new System.Drawing.Size(81, 13);
     93      this.label1.Size = new System.Drawing.Size(48, 13);
    8194      this.label1.TabIndex = 2;
    82       this.label1.Text = "Target variable:";
     95      this.label1.Text = "Variable:";
     96      //
     97      // aggregationComboBox
     98      //
     99      this.aggregationComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     100            | System.Windows.Forms.AnchorStyles.Right)));
     101      this.aggregationComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     102      this.aggregationComboBox.FormattingEnabled = true;
     103      this.aggregationComboBox.Location = new System.Drawing.Point(5, 79);
     104      this.aggregationComboBox.Name = "aggregationComboBox";
     105      this.aggregationComboBox.Size = new System.Drawing.Size(169, 21);
     106      this.aggregationComboBox.TabIndex = 1;
     107      this.aggregationComboBox.SelectedIndexChanged += new System.EventHandler(this.aggregationComboBox_SelectedIndexChanged);
    83108      //
    84109      // classifierComboBox
     
    88113      this.classifierComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    89114      this.classifierComboBox.FormattingEnabled = true;
    90       this.classifierComboBox.Location = new System.Drawing.Point(5, 32);
     115      this.classifierComboBox.Location = new System.Drawing.Point(5, 33);
    91116      this.classifierComboBox.Name = "classifierComboBox";
    92117      this.classifierComboBox.Size = new System.Drawing.Size(169, 21);
     
    114139    private System.Windows.Forms.ComboBox classifierComboBox;
    115140    private System.Windows.Forms.Label label1;
    116 
     141    private System.Windows.Forms.Label label2;
     142    private System.Windows.Forms.ComboBox aggregationComboBox;
    117143  }
    118144}
  • branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.cs

    r14581 r14583  
    3636    public HistogramView() {
    3737      InitializeComponent();
     38      aggregationComboBox.DataSource = Enum.GetValues(typeof(DataRowVisualProperties.DataRowHistogramAggregation));
     39      aggregationComboBox.SelectedItem = DataRowVisualProperties.DataRowHistogramAggregation.Overlapping;
    3840    }
    3941
     
    8284        classRow.Name = group.Key;
    8385        classRow.VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Histogram;
     86        classRow.VisualProperties.Aggregation = (DataRowVisualProperties.DataRowHistogramAggregation)aggregationComboBox.SelectedItem;
    8487        classRow.Values.AddRange(group);
    8588        dataTable.Rows.Add(classRow);
     
    9699      GenerateLayout();
    97100    }
     101
     102    private void aggregationComboBox_SelectedIndexChanged(object sender, EventArgs e) {
     103      foreach (var dt in dataTables.Values) {
     104        foreach (var row in dt.Rows) {
     105          row.VisualProperties.Aggregation = (DataRowVisualProperties.DataRowHistogramAggregation)aggregationComboBox.SelectedItem;
     106        }
     107      }
     108    }
    98109  }
    99110}
Note: See TracChangeset for help on using the changeset viewer.