Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/07/17 16:55:03 (7 years ago)
Author:
mkommend
Message:

#2709: Added grouping for multi scatter plot view.

File:
1 edited

Legend:

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

    r14580 r14725  
    5555      base.OnContentChanged();
    5656      if (Content != null) {
     57        groupingComboBox.Items.Add("");
     58        foreach (string var in PreprocessingChartContent.GetVariableNamesForGrouping(Content.PreprocessingData)) {
     59          groupingComboBox.Items.Add(var);
     60        }
     61        groupingComboBox.SelectedItem = Content.GroupingVariable;
     62
    5763        GenerateCharts();
    5864      }
     
    261267      if (!bodyCache.ContainsKey(key)) {
    262268        if (rowVariable == colVariable) { // use historgram if x and y variable are equal
    263           var dataTable = new DataTable();
    264           DataRow dataRow = Content.CreateDataRow(rowVariable, DataRowVisualProperties.DataRowChartType.Histogram);
    265           dataRow.VisualProperties.IsVisibleInLegend = false;
    266           dataTable.Rows.Add(dataRow);
     269          var dataTable = HistogramContent.CreateHistogram(Content.PreprocessingData, rowVariable, (string)groupingComboBox.SelectedItem, DataRowVisualProperties.DataRowHistogramAggregation.Overlapping);
     270          foreach (var dataRow in dataTable.Rows)
     271            dataRow.VisualProperties.IsVisibleInLegend = false;
     272
    267273          var pcv = new DataTableControl {
    268274            Name = key.ToString(),
     
    275281          bodyCache.Add(key, pcv);
    276282        } else { //scatter plot
    277           var scatterPlot = Content.CreateScatterPlot(colVariable, rowVariable);
     283          var scatterPlot = ScatterPlotContent.CreateScatterPlot(Content.PreprocessingData, colVariable, rowVariable, (string)groupingComboBox.SelectedItem);
    278284          var regressionType = (RegressionType)regressionTypeComboBox.SelectedValue;
    279285          int order = (int)polynomialRegressionOrderNumericUpDown.Value;
     
    486492    }
    487493    #endregion
     494
     495    private void groupingComboBox_SelectedIndexChanged(object sender, EventArgs e) {
     496      GenerateCharts();
     497    }
    488498  }
    489499}
Note: See TracChangeset for help on using the changeset viewer.