Changeset 15036
- Timestamp:
- 06/19/17 16:56:34 (7 years ago)
- Location:
- branches/DataPreprocessing Enhancements
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs
r15021 r15036 1 #region License Information 2 /* HeuristicLab 1 /* HeuristicLab 3 2 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 3 * … … 18 17 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 18 */ 20 #endregion21 19 22 20 using System; … … 37 35 [View("Scatter Plot Multi View")] 38 36 [Content(typeof(MultiScatterPlotContent), true)] 39 public partial class ScatterPlotMultiView : PreprocessingCheckedVariablesView {37 public sealed partial class ScatterPlotMultiView : PreprocessingCheckedVariablesView { 40 38 private readonly IDictionary<string, Label> columnHeaderCache = new Dictionary<string, Label>(); 41 39 private readonly IDictionary<string, VerticalLabel> rowHeaderCache = new Dictionary<string, VerticalLabel>(); … … 90 88 groupingComboBox.Items.Add(var); 91 89 } 90 SuppressCheckedChangedUpdate = true; 92 91 groupingComboBox.SelectedItem = Content.GroupingVariable ?? string.Empty; 92 SuppressCheckedChangedUpdate = false; 93 93 94 94 // uncheck variables that max 20 vars are selected initially 95 var list= Content.VariableItemList;96 int numChecked = list.CheckedItems.Count();95 var variables = Content.VariableItemList; 96 int numChecked = variables.CheckedItems.Count(); 97 97 if (numChecked > 20) { 98 string message = string.Format("Displaying {0} variables ({1} charts) can slown down HeuristicLab. " + 99 "Should the number of initially checked variables be reduced to 20?", 98 string message = string.Format("Display all {0} input variables ({1} charts)?" + Environment.NewLine + 99 "Press No to reduce the number of checked variables to 20." + Environment.NewLine + 100 "Press Cancel to uncheck all.", 100 101 numChecked, numChecked * numChecked); 101 if (MessageBox.Show(this, message, "Reduce befor continue?", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) { 102 var dialogResult = MessageBox.Show(this, message, "Display All Input Variables?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Warning); 103 if (dialogResult == DialogResult.No || dialogResult == DialogResult.Cancel) { 102 104 SuppressCheckedChangedUpdate = true; 103 foreach (var var in list.CheckedItems.Reverse().Take(numChecked - 20)) { 104 Content.VariableItemList.SetItemCheckedState(var.Value, false); 105 } 105 IEnumerable<StringValue> toUncheck = variables; 106 if (dialogResult == DialogResult.No) // only show the first 20 107 toUncheck = variables.CheckedItems.Reverse().Take(numChecked - 20).Select(x => x.Value); 108 foreach (var var in toUncheck) 109 Content.VariableItemList.SetItemCheckedState(var, false); 106 110 SuppressCheckedChangedUpdate = false; 107 111 } -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/StatisticsView.cs
r14996 r15036 88 88 private void UpdateData(Dictionary<string, bool> oldVisibility = null) { 89 89 var logic = Content.StatisticsLogic; 90 rowsTextBox.Text = logic.Get ColumnCount().ToString();91 columnsTextBox.Text = logic.Get RowCount().ToString();90 rowsTextBox.Text = logic.GetRowCount().ToString(); 91 columnsTextBox.Text = logic.GetColumnCount().ToString(); 92 92 numericColumnsTextBox.Text = logic.GetNumericColumnCount().ToString(); 93 93 nominalColumnsTextBox5.Text = logic.GetNominalColumnCount().ToString(); -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/HistogramContent.cs
r14993 r15036 55 55 56 56 public static DataTable CreateHistogram(IFilteredPreprocessingData preprocessingData, string variableName, string groupingVariableName, DataRowVisualProperties.DataRowHistogramAggregation aggregation, LegendOrder legendOrder = LegendOrder.Appearance) { 57 var dataTable = new DataTable(); 57 var dataTable = new DataTable { 58 VisualProperties = { Title = variableName } 59 }; 58 60 59 61 if (string.IsNullOrEmpty(groupingVariableName)) { 60 62 var row = PreprocessingChartContent.CreateDataRow(preprocessingData, variableName, DataRowVisualProperties.DataRowChartType.Histogram); 63 row.VisualProperties.IsVisibleInLegend = false; 61 64 dataTable.Rows.Add(row); 62 65 return dataTable; 63 66 } 64 65 dataTable.VisualProperties.Title = variableName;66 67 67 68 int variableIndex = preprocessingData.GetColumnIndex(variableName); … … 88 89 VisualProperties = { 89 90 ChartType = DataRowVisualProperties.DataRowChartType.Histogram, 90 Aggregation = aggregation 91 Aggregation = aggregation, 92 IsVisibleInLegend = !string.IsNullOrEmpty(groupingVariableName) 91 93 } 92 94 };
Note: See TracChangeset
for help on using the changeset viewer.