Changeset 14446
- Timestamp:
- 12/02/16 15:37:51 (8 years ago)
- Location:
- branches/DataPreprocessing Enhancements
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj
r14445 r14446 256 256 <Compile Include="ScatterPlotMultiView.Designer.cs"> 257 257 <DependentUpon>ScatterPlotMultiView.cs</DependentUpon> 258 </Compile>259 <Compile Include="PreprocessingScatterPlotView.cs">260 <SubType>UserControl</SubType>261 </Compile>262 <Compile Include="PreprocessingScatterPlotView.Designer.cs">263 <DependentUpon>PreprocessingScatterPlotView.cs</DependentUpon>264 258 </Compile> 265 259 <Compile Include="SearchAndReplaceDialog.cs"> -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs
r14388 r14446 5 5 using System.Windows.Forms; 6 6 using HeuristicLab.Analysis; 7 using HeuristicLab.Analysis.Views; 7 8 using HeuristicLab.Collections; 8 9 using HeuristicLab.Common; 9 using HeuristicLab.Core.Views;10 10 using HeuristicLab.Data; 11 11 using HeuristicLab.MainForm; … … 18 18 private readonly IDictionary<string, Label> columnHeaderCache; 19 19 private readonly IDictionary<string, Label> rowHeaderCache; 20 private readonly IDictionary<Tuple<string/*col*/, string/*row*/>, ItemView> bodyCache;20 private readonly IDictionary<Tuple<string/*col*/, string/*row*/>, Control> bodyCache; 21 21 22 22 public ScatterPlotMultiView() { … … 43 43 columnHeaderCache = new Dictionary<string, Label>(); 44 44 rowHeaderCache = new Dictionary<string, Label>(); 45 bodyCache = new Dictionary<Tuple<string, string>, ItemView>();45 bodyCache = new Dictionary<Tuple<string, string>, Control>(); 46 46 47 47 bodyScrollPanel.MouseWheel += bodyScrollPanel_MouseWheel; … … 249 249 return rowHeaderCache[variable]; 250 250 } 251 private ItemViewGetBody(string colVariable, string rowVariable) {251 private Control GetBody(string colVariable, string rowVariable) { 252 252 var key = Tuple.Create(colVariable, rowVariable); 253 253 if (!bodyCache.ContainsKey(key)) { … … 266 266 bodyCache.Add(key, pcv); 267 267 } else { //scatter plot 268 ScatterPlot scatterPlot = Content.CreateScatterPlot(colVariable, rowVariable); 269 PreprocessingScatterPlotView pspv = new PreprocessingScatterPlotView { 268 var scatterPlot = Content.CreateScatterPlot(colVariable, rowVariable); 269 scatterPlot.VisualProperties.Title = string.Empty; 270 var scatterPlotControl = new /*Preprocessing*/ScatterPlotControl { 270 271 Name = key.ToString(), 271 272 Content = scatterPlot, 272 273 Dock = DockStyle.Fill, 273 ShowLegend = false,274 XAxisFormat = "G3"274 //ShowLegend = false, 275 //XAxisFormat = "G3" 275 276 }; 276 pspv.ChartDoubleClick += ScatterPlotDoubleClick;277 bodyCache.Add(key, pspv);277 scatterPlotControl.DoubleClick += ScatterPlotDoubleClick; // ToDo: not working; double click is already handled by the chart 278 bodyCache.Add(key, scatterPlotControl); 278 279 } 279 280 } … … 344 345 //Open scatter plot in new tab with new content when double clicked 345 346 private void ScatterPlotDoubleClick(object sender, EventArgs e) { 346 PreprocessingScatterPlotView pspv = (PreprocessingScatterPlotView)sender;347 var scatterPlotControl = (ScatterPlotControl)sender; 347 348 ScatterPlotContent scatterContent = new ScatterPlotContent(Content, new Cloner()); // create new content 348 ScatterPlot scatterPlot = pspv.Content;349 ScatterPlot scatterPlot = scatterPlotControl.Content; 349 350 350 351 //Extract variable names from scatter plot and set them in content -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.Designer.cs
r14185 r14446 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.scatterPlot View = new HeuristicLab.DataPreprocessing.Views.PreprocessingScatterPlotView();47 this.scatterPlotControl = new HeuristicLab.Analysis.Views.ScatterPlotControl(); 48 48 this.groupBox1 = new System.Windows.Forms.GroupBox(); 49 this.label3 = new System.Windows.Forms.Label(); 49 50 this.label2 = new System.Windows.Forms.Label(); 50 51 this.label1 = new System.Windows.Forms.Label(); 52 this.comboBoxColor = new System.Windows.Forms.ComboBox(); 51 53 this.comboBoxYVariable = new System.Windows.Forms.ComboBox(); 52 54 this.comboBoxXVariable = new System.Windows.Forms.ComboBox(); 53 this.label3 = new System.Windows.Forms.Label();54 this.comboBoxColor = new System.Windows.Forms.ComboBox();55 55 this.groupBox1.SuspendLayout(); 56 56 this.SuspendLayout(); 57 57 // 58 // scatterPlot View58 // scatterPlotControl 59 59 // 60 this.scatterPlot View.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)61 | System.Windows.Forms.AnchorStyles.Left) 60 this.scatterPlotControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 61 | System.Windows.Forms.AnchorStyles.Left) 62 62 | System.Windows.Forms.AnchorStyles.Right))); 63 this.scatterPlotView.Caption = "ScatterPlot View"; 64 this.scatterPlotView.Content = null; 65 this.scatterPlotView.Location = new System.Drawing.Point(169, 3); 66 this.scatterPlotView.Name = "scatterPlotView"; 67 this.scatterPlotView.ReadOnly = false; 68 this.scatterPlotView.Size = new System.Drawing.Size(689, 509); 69 this.scatterPlotView.TabIndex = 0; 63 this.scatterPlotControl.Content = null; 64 this.scatterPlotControl.Location = new System.Drawing.Point(169, 3); 65 this.scatterPlotControl.Name = "scatterPlotControl"; 66 this.scatterPlotControl.Size = new System.Drawing.Size(689, 509); 67 this.scatterPlotControl.TabIndex = 0; 70 68 // 71 69 // groupBox1 … … 83 81 this.groupBox1.TabStop = false; 84 82 this.groupBox1.Text = "Options"; 83 // 84 // label3 85 // 86 this.label3.AutoSize = true; 87 this.label3.Location = new System.Drawing.Point(17, 141); 88 this.label3.Name = "label3"; 89 this.label3.Size = new System.Drawing.Size(31, 13); 90 this.label3.TabIndex = 3; 91 this.label3.Text = "Color"; 85 92 // 86 93 // label2 … … 101 108 this.label1.TabIndex = 2; 102 109 this.label1.Text = "X Variable"; 110 // 111 // comboBoxColor 112 // 113 this.comboBoxColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 114 this.comboBoxColor.FormattingEnabled = true; 115 this.comboBoxColor.Location = new System.Drawing.Point(20, 164); 116 this.comboBoxColor.Margin = new System.Windows.Forms.Padding(3, 10, 3, 3); 117 this.comboBoxColor.Name = "comboBoxColor"; 118 this.comboBoxColor.Size = new System.Drawing.Size(121, 21); 119 this.comboBoxColor.TabIndex = 1; 120 this.comboBoxColor.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedIndexChanged); 103 121 // 104 122 // comboBoxYVariable … … 124 142 this.comboBoxXVariable.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedIndexChanged); 125 143 // 126 // label3127 //128 this.label3.AutoSize = true;129 this.label3.Location = new System.Drawing.Point(17, 141);130 this.label3.Name = "label3";131 this.label3.Size = new System.Drawing.Size(31, 13);132 this.label3.TabIndex = 3;133 this.label3.Text = "Color";134 //135 // comboBoxColor136 //137 this.comboBoxColor.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;138 this.comboBoxColor.FormattingEnabled = true;139 this.comboBoxColor.Location = new System.Drawing.Point(20, 164);140 this.comboBoxColor.Margin = new System.Windows.Forms.Padding(3, 10, 3, 3);141 this.comboBoxColor.Name = "comboBoxColor";142 this.comboBoxColor.Size = new System.Drawing.Size(121, 21);143 this.comboBoxColor.TabIndex = 1;144 this.comboBoxColor.SelectedIndexChanged += new System.EventHandler(this.comboBox_SelectedIndexChanged);145 //146 144 // ScatterPlotSingleView 147 145 // … … 149 147 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 150 148 this.Controls.Add(this.groupBox1); 151 this.Controls.Add(this.scatterPlot View);149 this.Controls.Add(this.scatterPlotControl); 152 150 this.Name = "ScatterPlotSingleView"; 153 151 this.Size = new System.Drawing.Size(863, 517); … … 160 158 #endregion 161 159 162 private HeuristicLab. DataPreprocessing.Views.PreprocessingScatterPlotView scatterPlotView;160 private HeuristicLab.Analysis.Views.ScatterPlotControl scatterPlotControl; 163 161 private System.Windows.Forms.GroupBox groupBox1; 164 162 private System.Windows.Forms.Label label2; -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs
r14185 r14446 88 88 private void UpdateScatterPlot() { 89 89 if (comboBoxXVariable.SelectedItem != null && comboBoxYVariable.SelectedItem != null && comboBoxColor.SelectedItem != null) { 90 //get scatter plot with selected x and y variable 91 ScatterPlot scatterPlot = Content.CreateScatterPlot( 92 (string)comboBoxXVariable.SelectedItem, 93 (string)comboBoxYVariable.SelectedItem, 94 (string)comboBoxColor.SelectedItem); 95 scatterPlotView.Content = scatterPlot; 90 var xVariable = (string)comboBoxXVariable.SelectedItem; 91 var yVariable = (string)comboBoxYVariable.SelectedItem; 92 var colorVariable = (string)comboBoxColor.SelectedItem; 93 ScatterPlot scatterPlot = Content.CreateScatterPlot(xVariable, yVariable, colorVariable); 94 var vp = scatterPlot.VisualProperties; 95 vp.Title = string.Empty; 96 vp.XAxisTitle = xVariable; 97 vp.YAxisTitle = yVariable; 96 98 99 scatterPlotControl.Content = scatterPlot; 100 97 101 //save selected x and y variable in content 98 102 this.Content.SelectedXVariable = (string)comboBoxXVariable.SelectedItem; -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/ScatterPlotContent.cs
r14185 r14446 69 69 70 70 ScatterPlotDataRow scdr = new ScatterPlotDataRow(variableNameX + " - " + variableNameY, "", points); 71 scdr.VisualProperties.IsVisibleInLegend = false; 71 72 scatterPlot.Rows.Add(scdr); 72 73
Note: See TracChangeset
for help on using the changeset viewer.