Changeset 14441
- Timestamp:
- 12/02/16 13:43:34 (8 years ago)
- Location:
- branches/DataPreprocessing Enhancements
- Files:
-
- 5 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.cs
r14185 r14441 101 101 series.IsVisibleInLegend = i < 2; //only first two series are visible, non-missing and missing values 102 102 series.Color = i % 2 == 0 ? colorNonMissingValue : colorMissingValue; 103 series.IsValueShownAsLabel = true; 103 104 104 var values = yValuesPerColumn.Select(y => i < y.Count ? y[i] : 0).ToArray(); 105 // use NaN to indicate "no value" instead of zero-range datapoints 106 var values = yValuesPerColumn.Select(y => (i < y.Count && y[i] != 0) ? y[i] : double.NaN).ToArray(); 105 107 series.Points.DataBindY(values); 106 108 chart.Series.Add(series); … … 139 141 } 140 142 yValues.Add(valueCount); 141 if (missingState) //handle last missing 143 if (missingState) //handle last missing why? 142 144 { 143 yValues.Add(0);145 //yValues.Add(0); 144 146 } 145 147 columnsYValues.Add(yValues); -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj
r14381 r14441 353 353 <Private>False</Private> 354 354 </ProjectReference> 355 </ItemGroup> 356 <ItemGroup> 357 <EmbeddedResource Include="ScatterPlotSingleView.resx"> 358 <DependentUpon>ScatterPlotSingleView.cs</DependentUpon> 359 </EmbeddedResource> 355 360 </ItemGroup> 356 361 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.Designer.cs
r14185 r14441 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 r14441 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using System.Windows.Forms; 25 26 using HeuristicLab.Analysis; 26 27 using HeuristicLab.Core.Views; … … 77 78 protected override void OnContentChanged() { 78 79 base.OnContentChanged(); 80 81 comboBoxXVariable.Items.Clear(); 82 comboBoxYVariable.Items.Clear(); 83 comboBoxColor.Items.Clear(); 79 84 if (Content != null) { 80 85 InitData(); … … 88 93 private void UpdateScatterPlot() { 89 94 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; 95 var xVariable = (string) comboBoxXVariable.SelectedItem; 96 var yVariable = (string) comboBoxYVariable.SelectedItem; 97 var colorVariable = (string) comboBoxColor.SelectedItem; 98 99 ScatterPlot scatterPlot = Content.CreateScatterPlot(xVariable, yVariable, colorVariable); 100 101 var vp = scatterPlot.VisualProperties; 102 vp.Title = string.Empty; 103 vp.XAxisTitle = xVariable; 104 vp.YAxisTitle = yVariable; 105 106 107 scatterPlotControl.Content = scatterPlot; 96 108 97 109 //save selected x and y variable in content -
branches/DataPreprocessing Enhancements/HeuristicLab.DataPreprocessing/3.4/Content/ScatterPlotContent.cs
r14185 r14441 69 69 70 70 ScatterPlotDataRow scdr = new ScatterPlotDataRow(variableNameX + " - " + variableNameY, "", points); 71 scdr.VisualProperties.IsVisibleInLegend = false; 71 72 scatterPlot.Rows.Add(scdr); 72 73 … … 83 84 "", 84 85 values.Select(v => new Point2D<double>(v.x, v.y)), 85 new ScatterPlotDataRowVisualProperties() { Color = gradients[curGradient] });86 new ScatterPlotDataRowVisualProperties() { Color = gradients[curGradient], }); 86 87 curGradient += gradients.Count / numColors; 87 88 scatterPlot.Rows.Add(row);
Note: See TracChangeset
for help on using the changeset viewer.