Ignore:
Timestamp:
12/09/16 11:35:42 (4 years ago)
Author:
pfleck
Message:

#2709

  • Removed some groupboxes in ViewShortcutListView.
  • Removed unnecessary IViewChartShortcut
  • Split ScatterPlot Multi and Single in to separate contents.
  • Renamed Color-combo box in Scatterplot to "Group".
File:
1 edited

Legend:

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

    r14446 r14467  
    3030
    3131  [View("Scatter Plot Single View")]
    32   [Content(typeof(ScatterPlotContent), true)]
     32  [Content(typeof(SingleScatterPlotContent), true)]
    3333  public partial class ScatterPlotSingleView : ItemView {
    3434
    35     public new ScatterPlotContent Content {
    36       get { return (ScatterPlotContent)base.Content; }
     35    public new SingleScatterPlotContent Content {
     36      get { return (SingleScatterPlotContent)base.Content; }
    3737      set { base.Content = value; }
    3838    }
     
    4848      comboBoxXVariable.Items.Clear();
    4949      comboBoxYVariable.Items.Clear();
    50       comboBoxColor.Items.Clear();
     50      comboBoxGroup.Items.Clear();
    5151      comboBoxXVariable.Items.AddRange(variables.ToArray());
    5252      comboBoxYVariable.Items.AddRange(variables.ToArray());
    53       comboBoxColor.Items.Add("-");
     53      comboBoxGroup.Items.Add("-");
    5454      for (int i = 0; i < Content.PreprocessingData.Columns; ++i) {
    5555        if (Content.PreprocessingData.VariableHasType<double>(i)) {
    5656          double distinctValueCount = Content.PreprocessingData.GetValues<double>(i).GroupBy(x => x).Count();
    5757          if (distinctValueCount <= 20)
    58             comboBoxColor.Items.Add(Content.PreprocessingData.GetVariableName(i));
     58            comboBoxGroup.Items.Add(Content.PreprocessingData.GetVariableName(i));
    5959        }
    6060      }
    6161
    6262      // use x and y variable from content
    63       if (Content.SelectedXVariable != null && Content.SelectedYVariable != null && Content.SelectedColorVariable != null) {
     63      if (Content.SelectedXVariable != null && Content.SelectedYVariable != null && Content.SelectedGroupVariable != null) {
    6464        comboBoxXVariable.SelectedItem = Content.SelectedXVariable;
    6565        comboBoxYVariable.SelectedItem = Content.SelectedYVariable;
    66         comboBoxColor.SelectedItem = Content.SelectedColorVariable;
     66        comboBoxGroup.SelectedItem = Content.SelectedGroupVariable;
    6767      } else {
    6868        if (variables.Count() >= 2) {
    6969          comboBoxXVariable.SelectedIndex = 0;
    7070          comboBoxYVariable.SelectedIndex = 1;
    71           comboBoxColor.SelectedIndex = 0;
     71          comboBoxGroup.SelectedIndex = 0;
    7272          UpdateScatterPlot();
    7373        }
     
    8787
    8888    private void UpdateScatterPlot() {
    89       if (comboBoxXVariable.SelectedItem != null && comboBoxYVariable.SelectedItem != null && comboBoxColor.SelectedItem != null) {
     89      if (comboBoxXVariable.SelectedItem != null && comboBoxYVariable.SelectedItem != null && comboBoxGroup.SelectedItem != null) {
    9090        var xVariable = (string)comboBoxXVariable.SelectedItem;
    9191        var yVariable = (string)comboBoxYVariable.SelectedItem;
    92         var colorVariable = (string)comboBoxColor.SelectedItem;
    93         ScatterPlot scatterPlot = Content.CreateScatterPlot(xVariable, yVariable, colorVariable);
     92        var groupVariable = (string)comboBoxGroup.SelectedItem;
     93        ScatterPlot scatterPlot = Content.CreateScatterPlot(xVariable, yVariable, groupVariable);
    9494        var vp = scatterPlot.VisualProperties;
    9595        vp.Title = string.Empty;
     
    9898
    9999        scatterPlotControl.Content = scatterPlot;
    100        
     100
    101101        //save selected x and y variable in content
    102102        this.Content.SelectedXVariable = (string)comboBoxXVariable.SelectedItem;
    103103        this.Content.SelectedYVariable = (string)comboBoxYVariable.SelectedItem;
    104         this.Content.SelectedColorVariable = (string)comboBoxColor.SelectedItem;
     104        this.Content.SelectedGroupVariable = (string)comboBoxGroup.SelectedItem;
    105105      }
    106106    }
Note: See TracChangeset for help on using the changeset viewer.