Changeset 16140 for branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing/3.4/Content/PreprocessingChartContent.cs
- Timestamp:
- 09/14/18 11:36:59 (6 years ago)
- Location:
- branches/2817-BinPackingSpeedup
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2817-BinPackingSpeedup
- Property svn:mergeinfo changed
-
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing
- Property svn:mergeinfo changed
-
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing/3.4
- Property svn:mergeinfo changed
-
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing/3.4/Content/PreprocessingChartContent.cs
r15210 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 29 29 using HeuristicLab.Core; 30 30 using HeuristicLab.Data; 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 32 32 33 namespace HeuristicLab.DataPreprocessing { 33 34 [Item("PreprocessingChart", "Represents a preprocessing chart.")] 34 public class PreprocessingChartContent : Item, IViewShortcut { 35 [StorableClass] 36 public class PreprocessingChartContent : PreprocessingContent, IViewShortcut { 35 37 public enum LegendOrder { 36 38 Alphabetically, … … 42 44 } 43 45 44 private ICheckedItemList<StringValue> variableItemList = null; 46 [Storable] 47 private ICheckedItemList<StringValue> variableItemList; 45 48 public ICheckedItemList<StringValue> VariableItemList { 46 49 get { 47 50 if (variableItemList == null) 48 51 variableItemList = CreateVariableItemList(PreprocessingData); 49 return this.variableItemList;52 return variableItemList; 50 53 } 51 54 } 52 55 53 public IFilteredPreprocessingData PreprocessingData { get; private set; }54 56 public event DataPreprocessingChangedEventHandler Changed { 55 57 add { PreprocessingData.Changed += value; } … … 57 59 } 58 60 59 public PreprocessingChartContent(IFilteredPreprocessingData preprocessingData) { 60 PreprocessingData = preprocessingData; 61 #region Constructor, Cloning & Persistence 62 public PreprocessingChartContent(IFilteredPreprocessingData preprocessingData) 63 : base(preprocessingData) { 61 64 } 62 65 63 public PreprocessingChartContent(PreprocessingChartContent content, Cloner cloner) 64 : base(content, cloner) { 65 this.PreprocessingData = content.PreprocessingData; 66 this.variableItemList = cloner.Clone<ICheckedItemList<StringValue>>(variableItemList); 66 public PreprocessingChartContent(PreprocessingChartContent original, Cloner cloner) 67 : base(original, cloner) { 68 variableItemList = cloner.Clone(original.variableItemList); 67 69 } 68 70 public override IDeepCloneable Clone(Cloner cloner) { 69 71 return new PreprocessingChartContent(this, cloner); 70 72 } 73 74 [StorableConstructor] 75 protected PreprocessingChartContent(bool deserializing) 76 : base(deserializing) { } 77 #endregion 71 78 72 79 public DataRow CreateDataRow(string variableName, DataRowVisualProperties.DataRowChartType chartType) { … … 75 82 76 83 public static DataRow CreateDataRow(IFilteredPreprocessingData preprocessingData, string variableName, DataRowVisualProperties.DataRowChartType chartType) { 77 IList<double> values = preprocessingData.GetValues<double>(preprocessingData.GetColumnIndex(variableName)); 78 DataRow row = new DataRow(variableName, "", values); 79 row.VisualProperties.ChartType = chartType; 84 var values = preprocessingData.GetValues<double>(preprocessingData.GetColumnIndex(variableName)); 85 var row = new DataRow(variableName, "", values) { 86 VisualProperties = { 87 ChartType = chartType, 88 StartIndexZero = true 89 } 90 }; 80 91 return row; 81 92 }
Note: See TracChangeset
for help on using the changeset viewer.