Changeset 15097 for stable/HeuristicLab.Analysis.Views
- Timestamp:
- 06/30/17 16:41:06 (7 years ago)
- Location:
- stable
- Files:
-
- 11 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 14435-14439,14457-14458,14493,14508,14516,14519,14582,14740,14860-14861,14982,14984,14987,14992,15042,15068,15095
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Analysis.Views
-
stable/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.Designer.cs
r14186 r15097 49 49 this.colorButton = new System.Windows.Forms.Button(); 50 50 this.startIndexZeroCheckBox = new System.Windows.Forms.CheckBox(); 51 this.binsNumericUpDown = new System.Windows.Forms.NumericUpDown();52 51 this.label1 = new System.Windows.Forms.Label(); 53 52 this.label2 = new System.Windows.Forms.Label(); 54 this.label3 = new System.Windows.Forms.Label();55 53 this.commonGroupBox = new System.Windows.Forms.GroupBox(); 54 this.clearColorButton = new System.Windows.Forms.Button(); 55 this.isVisibleInLegendCheckBox = new System.Windows.Forms.CheckBox(); 56 this.label10 = new System.Windows.Forms.Label(); 56 57 this.displayNameTextBox = new System.Windows.Forms.TextBox(); 57 58 this.axisGroupBox = new System.Windows.Forms.GroupBox(); 59 this.panel2 = new System.Windows.Forms.Panel(); 58 60 this.yAxisSecondaryRadioButton = new System.Windows.Forms.RadioButton(); 61 this.yAxisPrimaryRadioButton = new System.Windows.Forms.RadioButton(); 62 this.panel1 = new System.Windows.Forms.Panel(); 59 63 this.xAxisPrimaryRadioButton = new System.Windows.Forms.RadioButton(); 60 this. yAxisPrimaryRadioButton = new System.Windows.Forms.RadioButton();64 this.xAxisSecondaryRadioButton = new System.Windows.Forms.RadioButton(); 61 65 this.label5 = new System.Windows.Forms.Label(); 62 this.xAxisSecondaryRadioButton = new System.Windows.Forms.RadioButton();63 66 this.label6 = new System.Windows.Forms.Label(); 64 67 this.label9 = new System.Windows.Forms.Label(); 65 this.histoGramGroupBox = new System.Windows.Forms.GroupBox();66 this.binsExactRadioButton = new System.Windows.Forms.RadioButton();67 this.binsApproximatelyRadioButton = new System.Windows.Forms.RadioButton();68 68 this.lineChartGroupBox = new System.Windows.Forms.GroupBox(); 69 69 this.lineWidthNumericUpDown = new System.Windows.Forms.NumericUpDown(); … … 72 72 this.lineStyleComboBox = new System.Windows.Forms.ComboBox(); 73 73 this.label8 = new System.Windows.Forms.Label(); 74 this.panel1 = new System.Windows.Forms.Panel();75 this.panel2 = new System.Windows.Forms.Panel();76 ((System.ComponentModel.ISupportInitialize)(this.binsNumericUpDown)).BeginInit();77 74 this.commonGroupBox.SuspendLayout(); 78 75 this.axisGroupBox.SuspendLayout(); 79 this.histoGramGroupBox.SuspendLayout(); 76 this.panel2.SuspendLayout(); 77 this.panel1.SuspendLayout(); 80 78 this.lineChartGroupBox.SuspendLayout(); 81 79 ((System.ComponentModel.ISupportInitialize)(this.lineWidthNumericUpDown)).BeginInit(); 82 this.panel1.SuspendLayout();83 this.panel2.SuspendLayout();84 80 this.SuspendLayout(); 85 81 // … … 90 86 this.chartTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 91 87 this.chartTypeComboBox.FormattingEnabled = true; 92 this.chartTypeComboBox.Location = new System.Drawing.Point( 57, 45);88 this.chartTypeComboBox.Location = new System.Drawing.Point(102, 45); 93 89 this.chartTypeComboBox.Name = "chartTypeComboBox"; 94 this.chartTypeComboBox.Size = new System.Drawing.Size(2 64, 21);90 this.chartTypeComboBox.Size = new System.Drawing.Size(219, 21); 95 91 this.chartTypeComboBox.TabIndex = 3; 96 92 this.chartTypeComboBox.SelectedValueChanged += new System.EventHandler(this.chartTypeComboBox_SelectedValueChanged); … … 103 99 // 104 100 this.colorButton.BackColor = System.Drawing.SystemColors.Control; 105 this.colorButton.Location = new System.Drawing.Point( 56, 72);101 this.colorButton.Location = new System.Drawing.Point(102, 72); 106 102 this.colorButton.Name = "colorButton"; 107 103 this.colorButton.Size = new System.Drawing.Size(23, 23); … … 121 117 this.startIndexZeroCheckBox.CheckedChanged += new System.EventHandler(this.startIndexZeroCheckBox_CheckedChanged); 122 118 // 123 // binsNumericUpDown124 //125 this.binsNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)126 | System.Windows.Forms.AnchorStyles.Right)));127 this.binsNumericUpDown.Location = new System.Drawing.Point(57, 19);128 this.binsNumericUpDown.Minimum = new decimal(new int[] {129 1,130 0,131 0,132 0});133 this.binsNumericUpDown.Name = "binsNumericUpDown";134 this.binsNumericUpDown.Size = new System.Drawing.Size(97, 20);135 this.binsNumericUpDown.TabIndex = 1;136 this.binsNumericUpDown.Value = new decimal(new int[] {137 1,138 0,139 0,140 0});141 this.binsNumericUpDown.ValueChanged += new System.EventHandler(this.binsNumericUpDown_ValueChanged);142 //143 119 // label1 144 120 // … … 159 135 this.label2.Text = "&Color:"; 160 136 // 161 // label3162 //163 this.label3.AutoSize = true;164 this.label3.Location = new System.Drawing.Point(6, 21);165 this.label3.Name = "label3";166 this.label3.Size = new System.Drawing.Size(30, 13);167 this.label3.TabIndex = 0;168 this.label3.Text = "&Bins:";169 //170 137 // commonGroupBox 171 138 // 172 139 this.commonGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 173 140 | System.Windows.Forms.AnchorStyles.Right))); 141 this.commonGroupBox.Controls.Add(this.clearColorButton); 142 this.commonGroupBox.Controls.Add(this.isVisibleInLegendCheckBox); 143 this.commonGroupBox.Controls.Add(this.label10); 174 144 this.commonGroupBox.Controls.Add(this.displayNameTextBox); 175 145 this.commonGroupBox.Controls.Add(this.axisGroupBox); … … 181 151 this.commonGroupBox.Location = new System.Drawing.Point(0, 0); 182 152 this.commonGroupBox.Name = "commonGroupBox"; 183 this.commonGroupBox.Size = new System.Drawing.Size(327, 1 74);153 this.commonGroupBox.Size = new System.Drawing.Size(327, 199); 184 154 this.commonGroupBox.TabIndex = 0; 185 155 this.commonGroupBox.TabStop = false; 186 156 this.commonGroupBox.Text = "Common"; 187 157 // 158 // clearColorButton 159 // 160 this.clearColorButton.BackColor = System.Drawing.SystemColors.ActiveCaption; 161 this.clearColorButton.Cursor = System.Windows.Forms.Cursors.Default; 162 this.clearColorButton.FlatAppearance.BorderSize = 0; 163 this.clearColorButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 164 this.clearColorButton.ForeColor = System.Drawing.Color.Transparent; 165 this.clearColorButton.Location = new System.Drawing.Point(128, 76); 166 this.clearColorButton.Margin = new System.Windows.Forms.Padding(0); 167 this.clearColorButton.Name = "clearColorButton"; 168 this.clearColorButton.Size = new System.Drawing.Size(15, 16); 169 this.clearColorButton.TabIndex = 10; 170 this.clearColorButton.TabStop = false; 171 this.clearColorButton.UseVisualStyleBackColor = false; 172 this.clearColorButton.Click += new System.EventHandler(this.clearColorButton_Click); 173 // 174 // isVisibleInLegendCheckBox 175 // 176 this.isVisibleInLegendCheckBox.AutoSize = true; 177 this.isVisibleInLegendCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; 178 this.isVisibleInLegendCheckBox.Location = new System.Drawing.Point(102, 104); 179 this.isVisibleInLegendCheckBox.Name = "isVisibleInLegendCheckBox"; 180 this.isVisibleInLegendCheckBox.Size = new System.Drawing.Size(15, 14); 181 this.isVisibleInLegendCheckBox.TabIndex = 8; 182 this.isVisibleInLegendCheckBox.UseVisualStyleBackColor = true; 183 this.isVisibleInLegendCheckBox.CheckedChanged += new System.EventHandler(this.isVisibleInLegendCheckBox_CheckedChanged); 184 // 185 // label10 186 // 187 this.label10.AutoSize = true; 188 this.label10.Location = new System.Drawing.Point(6, 104); 189 this.label10.Name = "label10"; 190 this.label10.Size = new System.Drawing.Size(90, 13); 191 this.label10.TabIndex = 7; 192 this.label10.Text = "&Visible in Legend:"; 193 // 188 194 // displayNameTextBox 189 195 // 190 196 this.displayNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 191 197 | System.Windows.Forms.AnchorStyles.Right))); 192 this.displayNameTextBox.Location = new System.Drawing.Point( 57, 19);198 this.displayNameTextBox.Location = new System.Drawing.Point(102, 19); 193 199 this.displayNameTextBox.Name = "displayNameTextBox"; 194 this.displayNameTextBox.Size = new System.Drawing.Size(2 64, 20);200 this.displayNameTextBox.Size = new System.Drawing.Size(219, 20); 195 201 this.displayNameTextBox.TabIndex = 1; 196 202 this.displayNameTextBox.Validated += new System.EventHandler(this.displayNameTextBox_Validated); … … 205 211 this.axisGroupBox.Controls.Add(this.label5); 206 212 this.axisGroupBox.Controls.Add(this.label6); 207 this.axisGroupBox.Location = new System.Drawing.Point(6, 1 01);213 this.axisGroupBox.Location = new System.Drawing.Point(6, 126); 208 214 this.axisGroupBox.Name = "axisGroupBox"; 209 215 this.axisGroupBox.Size = new System.Drawing.Size(315, 67); … … 211 217 this.axisGroupBox.TabStop = false; 212 218 this.axisGroupBox.Text = "Axes"; 219 // 220 // panel2 221 // 222 this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 223 | System.Windows.Forms.AnchorStyles.Right))); 224 this.panel2.Controls.Add(this.yAxisSecondaryRadioButton); 225 this.panel2.Controls.Add(this.yAxisPrimaryRadioButton); 226 this.panel2.Location = new System.Drawing.Point(51, 42); 227 this.panel2.Name = "panel2"; 228 this.panel2.Size = new System.Drawing.Size(258, 17); 229 this.panel2.TabIndex = 7; 213 230 // 214 231 // yAxisSecondaryRadioButton … … 224 241 this.yAxisSecondaryRadioButton.CheckedChanged += new System.EventHandler(this.yAxisRadioButton_CheckedChanged); 225 242 // 243 // yAxisPrimaryRadioButton 244 // 245 this.yAxisPrimaryRadioButton.AutoSize = true; 246 this.yAxisPrimaryRadioButton.Location = new System.Drawing.Point(0, 0); 247 this.yAxisPrimaryRadioButton.Name = "yAxisPrimaryRadioButton"; 248 this.yAxisPrimaryRadioButton.Size = new System.Drawing.Size(59, 17); 249 this.yAxisPrimaryRadioButton.TabIndex = 4; 250 this.yAxisPrimaryRadioButton.TabStop = true; 251 this.yAxisPrimaryRadioButton.Text = "&Primary"; 252 this.yAxisPrimaryRadioButton.UseVisualStyleBackColor = true; 253 this.yAxisPrimaryRadioButton.CheckedChanged += new System.EventHandler(this.yAxisRadioButton_CheckedChanged); 254 // 255 // panel1 256 // 257 this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 258 | System.Windows.Forms.AnchorStyles.Right))); 259 this.panel1.Controls.Add(this.xAxisPrimaryRadioButton); 260 this.panel1.Controls.Add(this.xAxisSecondaryRadioButton); 261 this.panel1.Location = new System.Drawing.Point(51, 19); 262 this.panel1.Name = "panel1"; 263 this.panel1.Size = new System.Drawing.Size(258, 17); 264 this.panel1.TabIndex = 6; 265 // 226 266 // xAxisPrimaryRadioButton 227 267 // … … 236 276 this.xAxisPrimaryRadioButton.CheckedChanged += new System.EventHandler(this.xAxisRadioButton_CheckedChanged); 237 277 // 238 // yAxisPrimaryRadioButton239 //240 this.yAxisPrimaryRadioButton.AutoSize = true;241 this.yAxisPrimaryRadioButton.Location = new System.Drawing.Point(0, 0);242 this.yAxisPrimaryRadioButton.Name = "yAxisPrimaryRadioButton";243 this.yAxisPrimaryRadioButton.Size = new System.Drawing.Size(59, 17);244 this.yAxisPrimaryRadioButton.TabIndex = 4;245 this.yAxisPrimaryRadioButton.TabStop = true;246 this.yAxisPrimaryRadioButton.Text = "&Primary";247 this.yAxisPrimaryRadioButton.UseVisualStyleBackColor = true;248 this.yAxisPrimaryRadioButton.CheckedChanged += new System.EventHandler(this.yAxisRadioButton_CheckedChanged);249 //250 // label5251 //252 this.label5.AutoSize = true;253 this.label5.Location = new System.Drawing.Point(6, 44);254 this.label5.Name = "label5";255 this.label5.Size = new System.Drawing.Size(39, 13);256 this.label5.TabIndex = 3;257 this.label5.Text = "&Y-Axis:";258 //259 278 // xAxisSecondaryRadioButton 260 279 // … … 269 288 this.xAxisSecondaryRadioButton.CheckedChanged += new System.EventHandler(this.xAxisRadioButton_CheckedChanged); 270 289 // 290 // label5 291 // 292 this.label5.AutoSize = true; 293 this.label5.Location = new System.Drawing.Point(6, 44); 294 this.label5.Name = "label5"; 295 this.label5.Size = new System.Drawing.Size(39, 13); 296 this.label5.TabIndex = 3; 297 this.label5.Text = "&Y-Axis:"; 298 // 271 299 // label6 272 300 // … … 287 315 this.label9.Text = "&Name:"; 288 316 // 289 // histoGramGroupBox290 //291 this.histoGramGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)292 | System.Windows.Forms.AnchorStyles.Right)));293 this.histoGramGroupBox.Controls.Add(this.binsExactRadioButton);294 this.histoGramGroupBox.Controls.Add(this.binsApproximatelyRadioButton);295 this.histoGramGroupBox.Controls.Add(this.binsNumericUpDown);296 this.histoGramGroupBox.Controls.Add(this.label3);297 this.histoGramGroupBox.Location = new System.Drawing.Point(0, 280);298 this.histoGramGroupBox.Name = "histoGramGroupBox";299 this.histoGramGroupBox.Size = new System.Drawing.Size(327, 47);300 this.histoGramGroupBox.TabIndex = 2;301 this.histoGramGroupBox.TabStop = false;302 this.histoGramGroupBox.Text = "Histogram Properties";303 //304 // binsExactRadioButton305 //306 this.binsExactRadioButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));307 this.binsExactRadioButton.AutoSize = true;308 this.binsExactRadioButton.Location = new System.Drawing.Point(269, 19);309 this.binsExactRadioButton.Name = "binsExactRadioButton";310 this.binsExactRadioButton.Size = new System.Drawing.Size(52, 17);311 this.binsExactRadioButton.TabIndex = 3;312 this.binsExactRadioButton.TabStop = true;313 this.binsExactRadioButton.Text = "&Exact";314 this.binsExactRadioButton.UseVisualStyleBackColor = true;315 this.binsExactRadioButton.CheckedChanged += new System.EventHandler(this.binNumberRadioButton_CheckedChanged);316 //317 // binsApproximatelyRadioButton318 //319 this.binsApproximatelyRadioButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));320 this.binsApproximatelyRadioButton.AutoSize = true;321 this.binsApproximatelyRadioButton.Location = new System.Drawing.Point(173, 19);322 this.binsApproximatelyRadioButton.Name = "binsApproximatelyRadioButton";323 this.binsApproximatelyRadioButton.Size = new System.Drawing.Size(90, 17);324 this.binsApproximatelyRadioButton.TabIndex = 2;325 this.binsApproximatelyRadioButton.TabStop = true;326 this.binsApproximatelyRadioButton.Text = "&Approximately";327 this.binsApproximatelyRadioButton.UseVisualStyleBackColor = true;328 this.binsApproximatelyRadioButton.CheckedChanged += new System.EventHandler(this.binNumberRadioButton_CheckedChanged);329 //330 317 // lineChartGroupBox 331 318 // … … 338 325 this.lineChartGroupBox.Controls.Add(this.lineStyleComboBox); 339 326 this.lineChartGroupBox.Controls.Add(this.label8); 340 this.lineChartGroupBox.Location = new System.Drawing.Point(0, 180);327 this.lineChartGroupBox.Location = new System.Drawing.Point(0, 205); 341 328 this.lineChartGroupBox.Name = "lineChartGroupBox"; 342 329 this.lineChartGroupBox.Size = new System.Drawing.Size(327, 94); … … 404 391 this.label8.Text = "&Style:"; 405 392 // 406 // panel1407 //408 this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)409 | System.Windows.Forms.AnchorStyles.Right)));410 this.panel1.Controls.Add(this.xAxisPrimaryRadioButton);411 this.panel1.Controls.Add(this.xAxisSecondaryRadioButton);412 this.panel1.Location = new System.Drawing.Point(51, 19);413 this.panel1.Name = "panel1";414 this.panel1.Size = new System.Drawing.Size(258, 17);415 this.panel1.TabIndex = 6;416 //417 // panel2418 //419 this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)420 | System.Windows.Forms.AnchorStyles.Right)));421 this.panel2.Controls.Add(this.yAxisSecondaryRadioButton);422 this.panel2.Controls.Add(this.yAxisPrimaryRadioButton);423 this.panel2.Location = new System.Drawing.Point(51, 42);424 this.panel2.Name = "panel2";425 this.panel2.Size = new System.Drawing.Size(258, 17);426 this.panel2.TabIndex = 7;427 //428 393 // DataRowVisualPropertiesControl 429 394 // 430 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);431 395 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 432 396 this.Controls.Add(this.lineChartGroupBox); 433 this.Controls.Add(this.histoGramGroupBox);434 397 this.Controls.Add(this.commonGroupBox); 435 398 this.Name = "DataRowVisualPropertiesControl"; 436 this.Size = new System.Drawing.Size(327, 331); 437 ((System.ComponentModel.ISupportInitialize)(this.binsNumericUpDown)).EndInit(); 399 this.Size = new System.Drawing.Size(327, 300); 438 400 this.commonGroupBox.ResumeLayout(false); 439 401 this.commonGroupBox.PerformLayout(); 440 402 this.axisGroupBox.ResumeLayout(false); 441 403 this.axisGroupBox.PerformLayout(); 442 this.histoGramGroupBox.ResumeLayout(false); 443 this.histoGramGroupBox.PerformLayout(); 404 this.panel2.ResumeLayout(false); 405 this.panel2.PerformLayout(); 406 this.panel1.ResumeLayout(false); 407 this.panel1.PerformLayout(); 444 408 this.lineChartGroupBox.ResumeLayout(false); 445 409 this.lineChartGroupBox.PerformLayout(); 446 410 ((System.ComponentModel.ISupportInitialize)(this.lineWidthNumericUpDown)).EndInit(); 447 this.panel1.ResumeLayout(false);448 this.panel1.PerformLayout();449 this.panel2.ResumeLayout(false);450 this.panel2.PerformLayout();451 411 this.ResumeLayout(false); 452 412 … … 459 419 private System.Windows.Forms.Button colorButton; 460 420 private System.Windows.Forms.CheckBox startIndexZeroCheckBox; 461 private System.Windows.Forms.NumericUpDown binsNumericUpDown;462 421 private System.Windows.Forms.Label label1; 463 422 private System.Windows.Forms.Label label2; 464 private System.Windows.Forms.Label label3;465 423 private System.Windows.Forms.GroupBox commonGroupBox; 466 private System.Windows.Forms.GroupBox histoGramGroupBox;467 424 private System.Windows.Forms.RadioButton xAxisSecondaryRadioButton; 468 425 private System.Windows.Forms.RadioButton yAxisSecondaryRadioButton; … … 474 431 private System.Windows.Forms.Label label4; 475 432 private System.Windows.Forms.Label label7; 476 private System.Windows.Forms.RadioButton binsExactRadioButton;477 private System.Windows.Forms.RadioButton binsApproximatelyRadioButton;478 433 private System.Windows.Forms.ComboBox lineStyleComboBox; 479 434 private System.Windows.Forms.Label label8; … … 484 439 private System.Windows.Forms.Panel panel2; 485 440 private System.Windows.Forms.Panel panel1; 441 private System.Windows.Forms.Label label10; 442 private System.Windows.Forms.CheckBox isVisibleInLegendCheckBox; 443 private System.Windows.Forms.Button clearColorButton; 486 444 } 487 445 } -
stable/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.cs
r14186 r15097 23 23 using System.Drawing; 24 24 using System.Windows.Forms; 25 using HeuristicLab.Common.Resources; 25 26 using HeuristicLab.MainForm; 26 27 using HeuristicLab.MainForm.WindowsForms; … … 45 46 chartTypeComboBox.DataSource = Enum.GetValues(typeof(DataRowVisualProperties.DataRowChartType)); 46 47 lineStyleComboBox.DataSource = Enum.GetValues(typeof(DataRowVisualProperties.DataRowLineStyle)); 48 clearColorButton.BackColor = Color.Transparent; 49 clearColorButton.BackgroundImage = VSImageLibrary.Delete; 47 50 SetEnabledStateOfControls(); 48 51 } … … 62 65 startIndexZeroCheckBox.Checked = false; 63 66 lineWidthNumericUpDown.Value = 1; 64 binsNumericUpDown.Value = 1;65 binsApproximatelyRadioButton.Checked = false;66 binsExactRadioButton.Checked = false;67 67 displayNameTextBox.Text = String.Empty; 68 68 } else { … … 86 86 lineWidthNumericUpDown.Value = lineWidthNumericUpDown.Maximum; 87 87 else lineWidthNumericUpDown.Value = Content.LineWidth; 88 if (Content.Bins < binsNumericUpDown.Minimum)89 binsNumericUpDown.Value = binsNumericUpDown.Minimum;90 else if (Content.Bins > binsNumericUpDown.Maximum)91 binsNumericUpDown.Value = binsNumericUpDown.Maximum;92 else binsNumericUpDown.Value = Content.Bins;93 binsApproximatelyRadioButton.Checked = !Content.ExactBins;94 binsExactRadioButton.Checked = Content.ExactBins;95 88 displayNameTextBox.Text = Content.DisplayName; 89 isVisibleInLegendCheckBox.Checked = Content.IsVisibleInLegend; 96 90 } 97 91 } finally { SuppressEvents = false; } … … 101 95 protected virtual void SetEnabledStateOfControls() { 102 96 commonGroupBox.Enabled = Content != null; 97 clearColorButton.Visible = Content != null && !Content.Color.IsEmpty; 103 98 lineChartGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Line; 104 histoGramGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Histogram;99 isVisibleInLegendCheckBox.Enabled = Content != null; 105 100 } 106 101 … … 126 121 colorButton.BackColor = Content.Color; 127 122 colorButton.Text = String.Empty; 123 clearColorButton.Visible = true; 124 } 125 } 126 127 private void clearColorButton_Click(object sender, EventArgs e) { 128 if (!SuppressEvents && Content != null) { 129 SuppressEvents = true; 130 try { 131 Content.Color = Color.Empty; 132 colorButton.BackColor = SystemColors.Control; 133 colorButton.Text = "?"; 134 clearColorButton.Visible = false; 135 } finally { SuppressEvents = false; } 128 136 } 129 137 } … … 165 173 } 166 174 167 private void binsNumericUpDown_ValueChanged(object sender, EventArgs e) {168 if (!SuppressEvents && Content != null) {169 Content.Bins = (int)binsNumericUpDown.Value;170 }171 }172 173 private void binNumberRadioButton_CheckedChanged(object sender, EventArgs e) {174 if (!SuppressEvents && Content != null) {175 SuppressEvents = true;176 try {177 Content.ExactBins = binsExactRadioButton.Checked;178 } finally { SuppressEvents = false; }179 }180 }181 182 175 private void displayNameTextBox_Validated(object sender, EventArgs e) { 183 176 if (!SuppressEvents && Content != null) { … … 188 181 } 189 182 } 183 184 private void isVisibleInLegendCheckBox_CheckedChanged(object sender, EventArgs e) { 185 if (!SuppressEvents && Content != null) { 186 Content.IsVisibleInLegend = isVisibleInLegendCheckBox.Checked; 187 } 188 } 190 189 #endregion 191 190 } -
stable/HeuristicLab.Analysis.Views/3.3/DataTableView.Designer.cs
r14982 r15097 107 107 this.configureToolStripMenuItem.Name = "configureToolStripMenuItem"; 108 108 this.configureToolStripMenuItem.Size = new System.Drawing.Size(256, 22); 109 this.configureToolStripMenuItem.Text = "Configure Chart ";109 this.configureToolStripMenuItem.Text = "Configure Chart..."; 110 110 this.configureToolStripMenuItem.Click += new System.EventHandler(this.configureToolStripMenuItem_Click); 111 111 // -
stable/HeuristicLab.Analysis.Views/3.3/DataTableView.cs
r14982 r15097 36 36 protected List<Series> invisibleSeries; 37 37 protected Dictionary<IObservableList<double>, DataRow> valuesRowsTable; 38 protected bool showChartOnly = false; 38 39 39 40 public new DataTable Content { … … 42 43 } 43 44 44 public bool Show Name{45 get { return nameTextBox.Visible; }45 public bool ShowChartOnly { 46 get { return showChartOnly; } 46 47 set { 47 if (nameTextBox.Visible != value) { 48 foreach (Control c in Controls) { 49 if (c == chart) continue; 50 c.Visible = value; 51 } 52 chart.Dock = value ? DockStyle.None : DockStyle.Fill; 48 if (showChartOnly != value) { 49 showChartOnly = value; 50 UpdateControlsVisibility(); 53 51 } 54 52 } … … 133 131 } else MessageBox.Show("Nothing to configure."); 134 132 } 133 134 protected void UpdateControlsVisibility() { 135 if (InvokeRequired) 136 Invoke(new Action(UpdateControlsVisibility)); 137 else { 138 foreach (Control c in Controls) { 139 if (c == chart) continue; 140 c.Visible = !showChartOnly; 141 } 142 chart.Dock = showChartOnly ? DockStyle.Fill : DockStyle.None; 143 } 144 } 145 135 146 protected virtual void AddDataRows(IEnumerable<DataRow> rows) { 136 147 foreach (var row in rows) { … … 195 206 break; 196 207 case DataRowVisualProperties.DataRowChartType.Histogram: 197 bool stacked = row.VisualProperties.Aggregation == DataRowVisualProperties.DataRowHistogramAggregation.Stacked;208 bool stacked = Content.VisualProperties.HistogramAggregation == DataTableVisualProperties.DataTableHistogramAggregation.Stacked; 198 209 series.ChartType = stacked ? SeriesChartType.StackedColumn : SeriesChartType.Column; 199 bool sideBySide = row.VisualProperties.Aggregation == DataRowVisualProperties.DataRowHistogramAggregation.SideBySide;210 bool sideBySide = Content.VisualProperties.HistogramAggregation == DataTableVisualProperties.DataTableHistogramAggregation.SideBySide; 200 211 series.SetCustomProperty("DrawSideBySide", sideBySide ? "True" : "False"); 201 212 series.SetCustomProperty("PointWidth", "1"); … … 319 330 private bool RequiresTransparency(DataRow row) { 320 331 return row.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Histogram 321 && row.VisualProperties.Aggregation == DataRowVisualProperties.DataRowHistogramAggregation.Overlapping;332 && Content.VisualProperties.HistogramAggregation == DataTableVisualProperties.DataTableHistogramAggregation.Overlapping; 322 333 } 323 334 … … 338 349 ConfigureChartArea(chart.ChartAreas[0]); 339 350 RecalculateAxesScale(chart.ChartAreas[0]); // axes min/max could have changed 351 352 chart.Update(); // side-by-side and stacked histograms are not always correctly displayed without an update 353 // (chart update is required before the series are updated, otherwise the widths of the bars are updated incorrectly) 354 foreach (var row in Content.Rows.Where(r => r.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Histogram)) 355 Row_VisualPropertiesChanged(row, EventArgs.Empty); // Histogram properties could have changed 340 356 } 341 357 } … … 551 567 switch (row.VisualProperties.ChartType) { 552 568 case DataRowVisualProperties.DataRowChartType.Histogram: 553 // when a single histogram is updated, all histograms must be updated. otherwise the value ranges and bin sizesmay not be equal.569 // when a single histogram is updated, all histograms must be updated. otherwise the value ranges may not be equal. 554 570 var histograms = Content.Rows 555 571 .Where(r => r.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Histogram) … … 595 611 if (!validValues.Any()) return; 596 612 597 int bins = histogramRows.Max(r => r.VisualProperties.Bins);613 int bins = Content.VisualProperties.HistogramBins; 598 614 decimal minValue = (decimal)validValues.Min(); 599 615 decimal maxValue = (decimal)validValues.Max(); … … 605 621 } 606 622 607 if (! histogramRows.Any(r => r.VisualProperties.ExactBins)) {623 if (!Content.VisualProperties.HistogramExactBins) { 608 624 intervalWidth = (decimal)HumanRoundRange((double)intervalWidth); 609 625 minValue = Math.Floor(minValue / intervalWidth) * intervalWidth; -
stable/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesControl.Designer.cs
r14186 r15097 105 105 this.label7 = new System.Windows.Forms.Label(); 106 106 this.label8 = new System.Windows.Forms.Label(); 107 this.histogramTabPage = new System.Windows.Forms.TabPage(); 108 this.histogramGroupBox = new System.Windows.Forms.GroupBox(); 109 this.histogramBinsExactRadioButton = new System.Windows.Forms.RadioButton(); 110 this.histogramBinsApproximatelyRadioButton = new System.Windows.Forms.RadioButton(); 111 this.histogramBinsNumericUpDown = new System.Windows.Forms.NumericUpDown(); 112 this.label16 = new System.Windows.Forms.Label(); 113 this.label17 = new System.Windows.Forms.Label(); 114 this.histogramAggregationComboBox = new System.Windows.Forms.ComboBox(); 107 115 this.titleTextBox = new System.Windows.Forms.TextBox(); 108 116 this.label15 = new System.Windows.Forms.Label(); … … 131 139 this.panel6.SuspendLayout(); 132 140 this.panel5.SuspendLayout(); 141 this.histogramTabPage.SuspendLayout(); 142 this.histogramGroupBox.SuspendLayout(); 143 ((System.ComponentModel.ISupportInitialize)(this.histogramBinsNumericUpDown)).BeginInit(); 133 144 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 134 145 this.SuspendLayout(); … … 489 500 this.axisTabControl.Controls.Add(this.xAxisTabPage); 490 501 this.axisTabControl.Controls.Add(this.yAxisTabPage); 502 this.axisTabControl.Controls.Add(this.histogramTabPage); 491 503 this.axisTabControl.Location = new System.Drawing.Point(0, 84); 492 504 this.axisTabControl.Name = "axisTabControl"; … … 791 803 this.label8.TabIndex = 2; 792 804 this.label8.Text = "&Minimum:"; 805 // 806 // histogramTabPage 807 // 808 this.histogramTabPage.Controls.Add(this.histogramGroupBox); 809 this.histogramTabPage.Location = new System.Drawing.Point(4, 22); 810 this.histogramTabPage.Name = "histogramTabPage"; 811 this.histogramTabPage.Padding = new System.Windows.Forms.Padding(3); 812 this.histogramTabPage.Size = new System.Drawing.Size(447, 263); 813 this.histogramTabPage.TabIndex = 2; 814 this.histogramTabPage.Text = "Histogram"; 815 this.histogramTabPage.UseVisualStyleBackColor = true; 816 // 817 // histogramGroupBox 818 // 819 this.histogramGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 820 | System.Windows.Forms.AnchorStyles.Right))); 821 this.histogramGroupBox.Controls.Add(this.histogramBinsExactRadioButton); 822 this.histogramGroupBox.Controls.Add(this.histogramBinsApproximatelyRadioButton); 823 this.histogramGroupBox.Controls.Add(this.histogramBinsNumericUpDown); 824 this.histogramGroupBox.Controls.Add(this.label16); 825 this.histogramGroupBox.Controls.Add(this.label17); 826 this.histogramGroupBox.Controls.Add(this.histogramAggregationComboBox); 827 this.histogramGroupBox.Location = new System.Drawing.Point(3, 3); 828 this.histogramGroupBox.Name = "histogramGroupBox"; 829 this.histogramGroupBox.Size = new System.Drawing.Size(441, 75); 830 this.histogramGroupBox.TabIndex = 2; 831 this.histogramGroupBox.TabStop = false; 832 this.histogramGroupBox.Text = "Histogram Properties"; 833 // 834 // histogramBinsExactRadioButton 835 // 836 this.histogramBinsExactRadioButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 837 this.histogramBinsExactRadioButton.AutoSize = true; 838 this.histogramBinsExactRadioButton.Location = new System.Drawing.Point(383, 19); 839 this.histogramBinsExactRadioButton.Name = "histogramBinsExactRadioButton"; 840 this.histogramBinsExactRadioButton.Size = new System.Drawing.Size(52, 17); 841 this.histogramBinsExactRadioButton.TabIndex = 3; 842 this.histogramBinsExactRadioButton.TabStop = true; 843 this.histogramBinsExactRadioButton.Text = "&Exact"; 844 this.histogramBinsExactRadioButton.UseVisualStyleBackColor = true; 845 this.histogramBinsExactRadioButton.CheckedChanged += new System.EventHandler(this.histogramBinsExactRadioButton_CheckedChanged); 846 // 847 // histogramBinsApproximatelyRadioButton 848 // 849 this.histogramBinsApproximatelyRadioButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 850 this.histogramBinsApproximatelyRadioButton.AutoSize = true; 851 this.histogramBinsApproximatelyRadioButton.Location = new System.Drawing.Point(287, 19); 852 this.histogramBinsApproximatelyRadioButton.Name = "histogramBinsApproximatelyRadioButton"; 853 this.histogramBinsApproximatelyRadioButton.Size = new System.Drawing.Size(90, 17); 854 this.histogramBinsApproximatelyRadioButton.TabIndex = 2; 855 this.histogramBinsApproximatelyRadioButton.TabStop = true; 856 this.histogramBinsApproximatelyRadioButton.Text = "&Approximately"; 857 this.histogramBinsApproximatelyRadioButton.UseVisualStyleBackColor = true; 858 // 859 // histogramBinsNumericUpDown 860 // 861 this.histogramBinsNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 862 | System.Windows.Forms.AnchorStyles.Right))); 863 this.histogramBinsNumericUpDown.Location = new System.Drawing.Point(82, 19); 864 this.histogramBinsNumericUpDown.Minimum = new decimal(new int[] { 865 1, 866 0, 867 0, 868 0}); 869 this.histogramBinsNumericUpDown.Name = "histogramBinsNumericUpDown"; 870 this.histogramBinsNumericUpDown.Size = new System.Drawing.Size(186, 20); 871 this.histogramBinsNumericUpDown.TabIndex = 1; 872 this.histogramBinsNumericUpDown.Value = new decimal(new int[] { 873 1, 874 0, 875 0, 876 0}); 877 this.histogramBinsNumericUpDown.ValueChanged += new System.EventHandler(this.histogramBinsNumericUpDown_ValueChanged); 878 // 879 // label16 880 // 881 this.label16.AutoSize = true; 882 this.label16.Location = new System.Drawing.Point(6, 49); 883 this.label16.Name = "label16"; 884 this.label16.Size = new System.Drawing.Size(67, 13); 885 this.label16.TabIndex = 0; 886 this.label16.Text = "Aggregation:"; 887 // 888 // label17 889 // 890 this.label17.AutoSize = true; 891 this.label17.Location = new System.Drawing.Point(6, 21); 892 this.label17.Name = "label17"; 893 this.label17.Size = new System.Drawing.Size(30, 13); 894 this.label17.TabIndex = 0; 895 this.label17.Text = "&Bins:"; 896 // 897 // histogramAggregationComboBox 898 // 899 this.histogramAggregationComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 900 | System.Windows.Forms.AnchorStyles.Right))); 901 this.histogramAggregationComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 902 this.histogramAggregationComboBox.FormattingEnabled = true; 903 this.histogramAggregationComboBox.Location = new System.Drawing.Point(82, 45); 904 this.histogramAggregationComboBox.Name = "histogramAggregationComboBox"; 905 this.histogramAggregationComboBox.Size = new System.Drawing.Size(353, 21); 906 this.histogramAggregationComboBox.TabIndex = 3; 907 this.histogramAggregationComboBox.SelectedValueChanged += new System.EventHandler(this.histogramAggregationComboBox_SelectedValueChanged); 793 908 // 794 909 // titleTextBox … … 927 1042 this.panel5.ResumeLayout(false); 928 1043 this.panel5.PerformLayout(); 1044 this.histogramTabPage.ResumeLayout(false); 1045 this.histogramGroupBox.ResumeLayout(false); 1046 this.histogramGroupBox.PerformLayout(); 1047 ((System.ComponentModel.ISupportInitialize)(this.histogramBinsNumericUpDown)).EndInit(); 929 1048 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 930 1049 this.ResumeLayout(false); … … 1005 1124 private System.Windows.Forms.CheckBox yAxisSecondaryLogScaleCheckBox; 1006 1125 private System.Windows.Forms.CheckBox yAxisPrimaryLogScaleCheckBox; 1126 private System.Windows.Forms.TabPage histogramTabPage; 1127 private System.Windows.Forms.GroupBox histogramGroupBox; 1128 private System.Windows.Forms.RadioButton histogramBinsExactRadioButton; 1129 private System.Windows.Forms.RadioButton histogramBinsApproximatelyRadioButton; 1130 private System.Windows.Forms.NumericUpDown histogramBinsNumericUpDown; 1131 private System.Windows.Forms.Label label16; 1132 private System.Windows.Forms.Label label17; 1133 private System.Windows.Forms.ComboBox histogramAggregationComboBox; 1007 1134 } 1008 1135 } -
stable/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesControl.cs
r14186 r15097 20 20 #endregion 21 21 22 using System; 23 using System.Drawing; 24 using System.Windows.Forms; 22 25 using HeuristicLab.MainForm; 23 26 using HeuristicLab.MainForm.WindowsForms; 24 using System.Drawing;25 using System.Windows.Forms;26 27 27 28 namespace HeuristicLab.Analysis.Views { … … 58 59 errorProvider.SetIconPadding(yAxisSecondaryMinimumFixedTextBox, 2); 59 60 errorProvider.SetIconPadding(yAxisSecondaryMaximumFixedTextBox, 2); 61 histogramAggregationComboBox.DataSource = Enum.GetValues(typeof(DataTableVisualProperties.DataTableHistogramAggregation)); 60 62 } 61 63 … … 101 103 yAxisSecondaryMaximumFixedTextBox.Text = string.Empty; 102 104 yAxisSecondaryLogScaleCheckBox.Checked = false; 105 106 histogramBinsNumericUpDown.Value = 1; 107 histogramBinsApproximatelyRadioButton.Checked = false; 108 histogramBinsExactRadioButton.Checked = false; 109 histogramAggregationComboBox.SelectedIndex = -1; 103 110 } else { 104 111 titleFontLabel.Text = "( " + FormatFont(Content.TitleFont) + " )"; … … 139 146 yAxisSecondaryMaximumFixedTextBox.Text = Content.SecondYAxisMaximumFixedValue.ToString(); 140 147 yAxisSecondaryLogScaleCheckBox.Checked = Content.SecondYAxisLogScale; 148 149 if (Content.HistogramBins < histogramBinsNumericUpDown.Minimum) 150 histogramBinsNumericUpDown.Value = histogramBinsNumericUpDown.Minimum; 151 else if (Content.HistogramBins > histogramBinsNumericUpDown.Maximum) 152 histogramBinsNumericUpDown.Value = histogramBinsNumericUpDown.Maximum; 153 else histogramBinsNumericUpDown.Value = Content.HistogramBins; 154 histogramBinsApproximatelyRadioButton.Checked = !Content.HistogramExactBins; 155 histogramBinsExactRadioButton.Checked = Content.HistogramExactBins; 156 histogramAggregationComboBox.SelectedItem = Content.HistogramAggregation; 141 157 } 142 158 } finally { SuppressEvents = false; } … … 483 499 } 484 500 } 501 502 private void histogramBinsNumericUpDown_ValueChanged(object sender, System.EventArgs e) { 503 if (!SuppressEvents && Content != null) { 504 Content.HistogramBins = (int)histogramBinsNumericUpDown.Value; 505 } 506 } 507 508 private void histogramBinsExactRadioButton_CheckedChanged(object sender, System.EventArgs e) { 509 if (!SuppressEvents && Content != null) { 510 SuppressEvents = true; 511 try { 512 Content.HistogramExactBins = histogramBinsExactRadioButton.Checked; 513 } finally { SuppressEvents = false; } 514 } 515 } 516 517 private void histogramAggregationComboBox_SelectedValueChanged(object sender, System.EventArgs e) { 518 if (!SuppressEvents && Content != null) { 519 SuppressEvents = true; 520 try { 521 Content.HistogramAggregation = (DataTableVisualProperties.DataTableHistogramAggregation)histogramAggregationComboBox.SelectedValue; 522 } finally { SuppressEvents = false; } 523 } 524 } 485 525 #endregion 486 526 -
stable/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesDialog.Designer.cs
r14186 r15097 69 69 this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 70 70 this.okButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 71 this.okButton.Location = new System.Drawing.Point(325, 4 25);71 this.okButton.Location = new System.Drawing.Point(325, 454); 72 72 this.okButton.Name = "okButton"; 73 73 this.okButton.Size = new System.Drawing.Size(75, 23); … … 81 81 this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 82 82 this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; 83 this.cancelButton.Location = new System.Drawing.Point(406, 4 25);83 this.cancelButton.Location = new System.Drawing.Point(406, 454); 84 84 this.cancelButton.Name = "cancelButton"; 85 85 this.cancelButton.Size = new System.Drawing.Size(75, 23); … … 99 99 this.tabControl.Name = "tabControl"; 100 100 this.tabControl.SelectedIndex = 0; 101 this.tabControl.Size = new System.Drawing.Size(469, 4 07);101 this.tabControl.Size = new System.Drawing.Size(469, 436); 102 102 this.tabControl.TabIndex = 2; 103 103 // … … 108 108 this.seriesTabPage.Name = "seriesTabPage"; 109 109 this.seriesTabPage.Padding = new System.Windows.Forms.Padding(3); 110 this.seriesTabPage.Size = new System.Drawing.Size(461, 381);110 this.seriesTabPage.Size = new System.Drawing.Size(461, 410); 111 111 this.seriesTabPage.TabIndex = 0; 112 112 this.seriesTabPage.Text = "Series"; … … 133 133 this.splitContainer.Panel2.Controls.Add(this.dataRowVisualPropertiesControl); 134 134 this.splitContainer.Panel2MinSize = 50; 135 this.splitContainer.Size = new System.Drawing.Size(461, 381);135 this.splitContainer.Size = new System.Drawing.Size(461, 410); 136 136 this.splitContainer.SplitterDistance = 125; 137 137 this.splitContainer.TabIndex = 0; … … 169 169 this.seriesListView.Name = "seriesListView"; 170 170 this.seriesListView.ShowGroups = false; 171 this.seriesListView.Size = new System.Drawing.Size(119, 3 46);171 this.seriesListView.Size = new System.Drawing.Size(119, 375); 172 172 this.seriesListView.TabIndex = 2; 173 173 this.seriesListView.UseCompatibleStateImageBehavior = false; … … 183 183 this.dataRowVisualPropertiesControl.Location = new System.Drawing.Point(3, 26); 184 184 this.dataRowVisualPropertiesControl.Name = "dataRowVisualPropertiesControl"; 185 this.dataRowVisualPropertiesControl.Size = new System.Drawing.Size(326, 3 52);185 this.dataRowVisualPropertiesControl.Size = new System.Drawing.Size(326, 381); 186 186 this.dataRowVisualPropertiesControl.TabIndex = 0; 187 187 // … … 213 213 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 214 214 this.CancelButton = this.cancelButton; 215 this.ClientSize = new System.Drawing.Size(493, 4 60);215 this.ClientSize = new System.Drawing.Size(493, 489); 216 216 this.Controls.Add(this.tabControl); 217 217 this.Controls.Add(this.cancelButton); -
stable/HeuristicLab.Analysis.Views/3.3/HeuristicLab.Analysis.Views-3.3.csproj
r11920 r15097 105 105 </PropertyGroup> 106 106 <ItemGroup> 107 <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 108 <HintPath>..\..\bin\ALGLIB-3.7.0.dll</HintPath> 109 <Private>False</Private> 110 </Reference> 107 111 <Reference Include="System" /> 108 112 <Reference Include="System.Core"> … … 122 126 </ItemGroup> 123 127 <ItemGroup> 128 <Compile Include="DataTableView.cs"> 129 <SubType>UserControl</SubType> 130 </Compile> 131 <Compile Include="DataTableView.Designer.cs"> 132 <DependentUpon>DataTableView.cs</DependentUpon> 133 </Compile> 134 <Compile Include="ScatterPlotView.cs"> 135 <SubType>UserControl</SubType> 136 </Compile> 137 <Compile Include="ScatterPlotView.Designer.cs"> 138 <DependentUpon>ScatterPlotView.cs</DependentUpon> 139 </Compile> 124 140 <Compile Include="ScatterPlotVisualPropertiesDialog.cs"> 125 141 <SubType>Form</SubType> … … 140 156 <DependentUpon>ScatterPlotDataRowVisualPropertiesControl.cs</DependentUpon> 141 157 </Compile> 142 <Compile Include="ScatterPlotView.cs">143 <SubType>UserControl</SubType>144 </Compile>145 <Compile Include="ScatterPlotView.Designer.cs">146 <DependentUpon>ScatterPlotView.cs</DependentUpon>147 </Compile>148 158 <Compile Include="ScatterPlotHistoryView.cs"> 149 159 <SubType>UserControl</SubType> … … 209 219 <Compile Include="Plugin.cs" /> 210 220 <Compile Include="Properties\AssemblyInfo.cs" /> 211 <Compile Include="DataTableView.cs">212 <SubType>UserControl</SubType>213 </Compile>214 <Compile Include="DataTableView.Designer.cs">215 <DependentUpon>DataTableView.cs</DependentUpon>216 </Compile>217 221 <Compile Include="HistogramControl.cs"> 218 222 <SubType>UserControl</SubType> -
stable/HeuristicLab.Analysis.Views/3.3/Plugin.cs.frame
r14190 r15097 28 28 [Plugin("HeuristicLab.Analysis.Views", "3.3.14.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Analysis.Views-3.3.dll", PluginFileType.Assembly)] 30 [PluginDependency("HeuristicLab.ALGLIB", "3.7.0")] 30 31 [PluginDependency("HeuristicLab.Analysis", "3.3")] 31 32 [PluginDependency("HeuristicLab.Collections", "3.3")] -
stable/HeuristicLab.Analysis.Views/3.3/ScatterPlotDataRowVisualPropertiesControl.Designer.cs
r14186 r15097 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.components = new System.ComponentModel.Container(); 47 48 this.pointStyleComboBox = new System.Windows.Forms.ComboBox(); 48 49 this.colorDialog = new System.Windows.Forms.ColorDialog(); … … 56 57 this.label9 = new System.Windows.Forms.Label(); 57 58 this.label7 = new System.Windows.Forms.Label(); 59 this.label4 = new System.Windows.Forms.Label(); 60 this.regressionTypeComboBox = new System.Windows.Forms.ComboBox(); 61 this.regressionGroupBox = new System.Windows.Forms.GroupBox(); 62 this.isRegressionVisibleInLegendCheckBox = new System.Windows.Forms.CheckBox(); 63 this.polynomialRegressionOrderNumericUpDown = new System.Windows.Forms.NumericUpDown(); 64 this.orderLabel = new System.Windows.Forms.Label(); 65 this.regressionLegendTextBox = new System.Windows.Forms.TextBox(); 66 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 67 this.clearColorButton = new System.Windows.Forms.Button(); 58 68 ((System.ComponentModel.ISupportInitialize)(this.pointSizeNumericUpDown)).BeginInit(); 69 this.regressionGroupBox.SuspendLayout(); 70 ((System.ComponentModel.ISupportInitialize)(this.polynomialRegressionOrderNumericUpDown)).BeginInit(); 59 71 this.SuspendLayout(); 60 72 // … … 171 183 this.label7.Text = "&Visible in Legend:"; 172 184 // 185 // label4 186 // 187 this.label4.AutoSize = true; 188 this.label4.Location = new System.Drawing.Point(6, 22); 189 this.label4.Name = "label4"; 190 this.label4.Size = new System.Drawing.Size(34, 13); 191 this.label4.TabIndex = 7; 192 this.label4.Text = "Type:"; 193 // 194 // regressionTypeComboBox 195 // 196 this.regressionTypeComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 197 | System.Windows.Forms.AnchorStyles.Right))); 198 this.regressionTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 199 this.regressionTypeComboBox.FormattingEnabled = true; 200 this.regressionTypeComboBox.Location = new System.Drawing.Point(93, 19); 201 this.regressionTypeComboBox.Name = "regressionTypeComboBox"; 202 this.regressionTypeComboBox.Size = new System.Drawing.Size(147, 21); 203 this.regressionTypeComboBox.TabIndex = 8; 204 this.regressionTypeComboBox.SelectedValueChanged += new System.EventHandler(this.regressionTypeComboBox_SelectedValueChanged); 205 // 206 // regressionGroupBox 207 // 208 this.regressionGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 209 | System.Windows.Forms.AnchorStyles.Right))); 210 this.regressionGroupBox.Controls.Add(this.isRegressionVisibleInLegendCheckBox); 211 this.regressionGroupBox.Controls.Add(this.regressionTypeComboBox); 212 this.regressionGroupBox.Controls.Add(this.polynomialRegressionOrderNumericUpDown); 213 this.regressionGroupBox.Controls.Add(this.orderLabel); 214 this.regressionGroupBox.Controls.Add(this.regressionLegendTextBox); 215 this.regressionGroupBox.Controls.Add(this.label4); 216 this.regressionGroupBox.Location = new System.Drawing.Point(3, 136); 217 this.regressionGroupBox.Name = "regressionGroupBox"; 218 this.regressionGroupBox.Size = new System.Drawing.Size(336, 74); 219 this.regressionGroupBox.TabIndex = 9; 220 this.regressionGroupBox.TabStop = false; 221 this.regressionGroupBox.Text = "&Regression"; 222 // 223 // isRegressionVisibleInLegendCheckBox 224 // 225 this.isRegressionVisibleInLegendCheckBox.AutoSize = true; 226 this.isRegressionVisibleInLegendCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; 227 this.isRegressionVisibleInLegendCheckBox.Location = new System.Drawing.Point(6, 48); 228 this.isRegressionVisibleInLegendCheckBox.Name = "isRegressionVisibleInLegendCheckBox"; 229 this.isRegressionVisibleInLegendCheckBox.Size = new System.Drawing.Size(68, 17); 230 this.isRegressionVisibleInLegendCheckBox.TabIndex = 13; 231 this.isRegressionVisibleInLegendCheckBox.Text = "Legend: "; 232 this.isRegressionVisibleInLegendCheckBox.UseVisualStyleBackColor = true; 233 this.isRegressionVisibleInLegendCheckBox.CheckedChanged += new System.EventHandler(this.isRegressionVisibleInLegendCheckBox_CheckedChanged); 234 // 235 // polynomialRegressionOrderNumericUpDown 236 // 237 this.polynomialRegressionOrderNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 238 this.polynomialRegressionOrderNumericUpDown.Location = new System.Drawing.Point(285, 20); 239 this.polynomialRegressionOrderNumericUpDown.Margin = new System.Windows.Forms.Padding(9, 3, 3, 3); 240 this.polynomialRegressionOrderNumericUpDown.Maximum = new decimal(new int[] { 241 6, 242 0, 243 0, 244 0}); 245 this.polynomialRegressionOrderNumericUpDown.Minimum = new decimal(new int[] { 246 2, 247 0, 248 0, 249 0}); 250 this.polynomialRegressionOrderNumericUpDown.Name = "polynomialRegressionOrderNumericUpDown"; 251 this.polynomialRegressionOrderNumericUpDown.Size = new System.Drawing.Size(45, 20); 252 this.polynomialRegressionOrderNumericUpDown.TabIndex = 11; 253 this.toolTip.SetToolTip(this.polynomialRegressionOrderNumericUpDown, "Order only available for Polynomial"); 254 this.polynomialRegressionOrderNumericUpDown.Value = new decimal(new int[] { 255 2, 256 0, 257 0, 258 0}); 259 this.polynomialRegressionOrderNumericUpDown.ValueChanged += new System.EventHandler(this.polynomialRegressionOrderNumericUpDown_ValueChanged); 260 // 261 // orderLabel 262 // 263 this.orderLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 264 this.orderLabel.AutoSize = true; 265 this.orderLabel.Location = new System.Drawing.Point(246, 22); 266 this.orderLabel.Name = "orderLabel"; 267 this.orderLabel.Size = new System.Drawing.Size(36, 13); 268 this.orderLabel.TabIndex = 12; 269 this.orderLabel.Text = "Order:"; 270 // 271 // regressionLegendTextBox 272 // 273 this.regressionLegendTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 274 | System.Windows.Forms.AnchorStyles.Right))); 275 this.regressionLegendTextBox.Location = new System.Drawing.Point(93, 46); 276 this.regressionLegendTextBox.Name = "regressionLegendTextBox"; 277 this.regressionLegendTextBox.Size = new System.Drawing.Size(237, 20); 278 this.regressionLegendTextBox.TabIndex = 10; 279 this.regressionLegendTextBox.Validated += new System.EventHandler(this.regressionLegendTextBox_Validated); 280 // 281 // clearColorButton 282 // 283 this.clearColorButton.BackColor = System.Drawing.SystemColors.ActiveCaption; 284 this.clearColorButton.Cursor = System.Windows.Forms.Cursors.Default; 285 this.clearColorButton.FlatAppearance.BorderSize = 0; 286 this.clearColorButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 287 this.clearColorButton.ForeColor = System.Drawing.Color.Transparent; 288 this.clearColorButton.Location = new System.Drawing.Point(125, 65); 289 this.clearColorButton.Margin = new System.Windows.Forms.Padding(0); 290 this.clearColorButton.Name = "clearColorButton"; 291 this.clearColorButton.Size = new System.Drawing.Size(15, 16); 292 this.clearColorButton.TabIndex = 11; 293 this.clearColorButton.TabStop = false; 294 this.clearColorButton.UseVisualStyleBackColor = false; 295 this.clearColorButton.Click += new System.EventHandler(this.clearColorButton_Click); 296 // 173 297 // ScatterPlotDataRowVisualPropertiesControl 174 298 // 175 299 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 300 this.Controls.Add(this.clearColorButton); 301 this.Controls.Add(this.regressionGroupBox); 176 302 this.Controls.Add(this.pointSizeNumericUpDown); 177 303 this.Controls.Add(this.isVisibleInLegendCheckBox); … … 185 311 this.Controls.Add(this.colorButton); 186 312 this.Name = "ScatterPlotDataRowVisualPropertiesControl"; 187 this.Size = new System.Drawing.Size(342, 135);313 this.Size = new System.Drawing.Size(342, 215); 188 314 ((System.ComponentModel.ISupportInitialize)(this.pointSizeNumericUpDown)).EndInit(); 315 this.regressionGroupBox.ResumeLayout(false); 316 this.regressionGroupBox.PerformLayout(); 317 ((System.ComponentModel.ISupportInitialize)(this.polynomialRegressionOrderNumericUpDown)).EndInit(); 189 318 this.ResumeLayout(false); 190 319 this.PerformLayout(); … … 205 334 private System.Windows.Forms.Label label9; 206 335 private System.Windows.Forms.Label label3; 336 private System.Windows.Forms.Label label4; 337 private System.Windows.Forms.ComboBox regressionTypeComboBox; 338 private System.Windows.Forms.GroupBox regressionGroupBox; 339 private System.Windows.Forms.TextBox regressionLegendTextBox; 340 private System.Windows.Forms.NumericUpDown polynomialRegressionOrderNumericUpDown; 341 private System.Windows.Forms.Label orderLabel; 342 private System.Windows.Forms.ToolTip toolTip; 343 private System.Windows.Forms.CheckBox isRegressionVisibleInLegendCheckBox; 344 private System.Windows.Forms.Button clearColorButton; 207 345 } 208 346 } -
stable/HeuristicLab.Analysis.Views/3.3/ScatterPlotDataRowVisualPropertiesControl.cs
r14186 r15097 23 23 using System.Drawing; 24 24 using System.Windows.Forms; 25 using HeuristicLab.Common.Resources; 25 26 using HeuristicLab.MainForm; 26 27 using HeuristicLab.MainForm.WindowsForms; … … 44 45 InitializeComponent(); 45 46 pointStyleComboBox.DataSource = Enum.GetValues(typeof(ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle)); 47 regressionTypeComboBox.DataSource = Enum.GetValues(typeof(ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType)); 48 clearColorButton.BackColor = Color.Transparent; 49 clearColorButton.BackgroundImage = VSImageLibrary.Delete; 46 50 SetEnabledStateOfControls(); 47 51 } … … 57 61 pointSizeNumericUpDown.Value = 1; 58 62 displayNameTextBox.Text = String.Empty; 63 regressionTypeComboBox.SelectedIndex = -1; 64 polynomialRegressionOrderNumericUpDown.Value = 2; 65 isRegressionVisibleInLegendCheckBox.Checked = false; 66 regressionLegendTextBox.Text = string.Empty; 59 67 } else { 60 68 displayNameTextBox.Text = Content.DisplayName; … … 69 77 pointSizeNumericUpDown.Value = Content.PointSize; 70 78 isVisibleInLegendCheckBox.Checked = Content.IsVisibleInLegend; 79 regressionTypeComboBox.SelectedItem = Content.RegressionType; 80 polynomialRegressionOrderNumericUpDown.Value = Content.PolynomialRegressionOrder; 81 isRegressionVisibleInLegendCheckBox.Checked = Content.IsRegressionVisibleInLegend; 82 regressionLegendTextBox.Text = content.RegressionDisplayName; 71 83 } 72 84 } … … 78 90 pointStyleComboBox.Enabled = Content != null; 79 91 colorButton.Enabled = Content != null; 80 c olorButton.Enabled = Content != null;92 clearColorButton.Visible = Content != null && !Content.Color.IsEmpty; 81 93 isVisibleInLegendCheckBox.Enabled = Content != null; 82 94 pointSizeNumericUpDown.Enabled = Content != null; 83 95 displayNameTextBox.Enabled = Content != null; 96 regressionTypeComboBox.Enabled = Content != null; 97 polynomialRegressionOrderNumericUpDown.Enabled = Content != null && Content.RegressionType == ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Polynomial; 98 orderLabel.Enabled = polynomialRegressionOrderNumericUpDown.Enabled; 99 isRegressionVisibleInLegendCheckBox.Enabled = Content != null && Content.RegressionType != ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.None; 100 regressionLegendTextBox.Enabled = Content != null && Content.RegressionType != ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.None; 84 101 } 85 102 … … 87 104 private void pointStyleComboBox_SelectedValueChanged(object sender, EventArgs e) { 88 105 if (!SuppressEvents && Content != null) { 89 ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyleselected = (ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle)pointStyleComboBox.SelectedValue;106 var selected = (ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle)pointStyleComboBox.SelectedValue; 90 107 Content.PointStyle = selected; 91 108 } … … 97 114 colorButton.BackColor = Content.Color; 98 115 colorButton.Text = String.Empty; 116 clearColorButton.Visible = true; 117 } 118 } 119 120 private void clearColorButton_Click(object sender, EventArgs e) { 121 if (!SuppressEvents && Content != null) { 122 Content.Color = Color.Empty; 123 colorButton.BackColor = SystemColors.Control; 124 colorButton.Text = "?"; 125 clearColorButton.Visible = false; 99 126 } 100 127 } … … 121 148 } 122 149 } 150 151 private void regressionTypeComboBox_SelectedValueChanged(object sender, EventArgs e) { 152 if (!SuppressEvents && Content != null) { 153 var selected = (ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType)regressionTypeComboBox.SelectedValue; 154 Content.RegressionType = selected; 155 SetEnabledStateOfControls(); 156 } 157 } 158 159 private void polynomialRegressionOrderNumericUpDown_ValueChanged(object sender, EventArgs e) { 160 if (!SuppressEvents && Content != null) { 161 Content.PolynomialRegressionOrder = (int)polynomialRegressionOrderNumericUpDown.Value; 162 } 163 } 164 165 private void isRegressionVisibleInLegendCheckBox_CheckedChanged(object sender, EventArgs e) { 166 if (!SuppressEvents && Content != null) { 167 Content.IsRegressionVisibleInLegend = isRegressionVisibleInLegendCheckBox.Checked; 168 } 169 } 170 171 private void regressionLegendTextBox_Validated(object sender, EventArgs e) { 172 if (!SuppressEvents && Content != null) { 173 Content.RegressionDisplayName = regressionLegendTextBox.Text; 174 } 175 } 123 176 #endregion 124 177 } -
stable/HeuristicLab.Analysis.Views/3.3/ScatterPlotView.Designer.cs
r14982 r15097 69 69 // chart 70 70 // 71 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 72 | System.Windows.Forms.AnchorStyles.Left) 71 this.chart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 72 | System.Windows.Forms.AnchorStyles.Left) 73 73 | System.Windows.Forms.AnchorStyles.Right))); 74 74 this.chart.BorderlineColor = System.Drawing.Color.Black; … … 107 107 this.configureToolStripMenuItem.Name = "configureToolStripMenuItem"; 108 108 this.configureToolStripMenuItem.Size = new System.Drawing.Size(256, 22); 109 this.configureToolStripMenuItem.Text = "Configure Chart ";109 this.configureToolStripMenuItem.Text = "Configure Chart..."; 110 110 this.configureToolStripMenuItem.Click += new System.EventHandler(this.configureToolStripMenuItem_Click); 111 111 // -
stable/HeuristicLab.Analysis.Views/3.3/ScatterPlotView.cs
r14982 r15097 571 571 572 572 double[] coefficients; 573 if (!Fitting(row, out coefficients)) 573 if (!Fitting(row, out coefficients)) { 574 regressionSeries.LegendToolTip = "Could not calculate regression."; 574 575 return; 576 } 575 577 576 578 // Fill regrssion series 577 var validPoints = row.Points.Where(p => !IsInvalidValue(p.X)); 578 double min = validPoints.Min(p => p.X), max = validPoints.Max(p => p.X); 579 double range = max - min, delta = range / row.Points.Count; 580 for (double x = min; x < max; x += delta) { 581 regressionSeries.Points.AddXY(x, Estimate(x, row, coefficients)); 579 double min = row.Points.Min(p => p.X), max = row.Points.Max(p => p.X); 580 double range = max - min, delta = range / Math.Max(row.Points.Count - 1, 50); 581 if (range > double.Epsilon) { 582 for (double x = min; x <= max; x += delta) { 583 regressionSeries.Points.AddXY(x, Estimate(x, row, coefficients)); 584 } 582 585 } 583 586 … … 657 660 658 661 protected static bool Fitting(ScatterPlotDataRow row, out double[] coefficients) { 662 if (!IsValidRegressionData(row)) { 663 coefficients = new double[0]; 664 return false; 665 } 666 659 667 var xs = row.Points.Select(p => p.X).ToList(); 660 668 var ys = row.Points.Select(p => p.Y).ToList(); … … 688 696 // Linear fitting 689 697 bool success = LinearFitting(matrix, nRows, out coefficients); 690 if (!success) return success;698 if (!success) return false; 691 699 692 700 // Output transformation … … 698 706 } 699 707 708 return true; 709 } 710 protected static bool IsValidRegressionData(ScatterPlotDataRow row) { 711 // No invalid values allowed 712 for (int i = 0; i < row.Points.Count; i++) { 713 if (IsInvalidValue(row.Points[i].X) || IsInvalidValue(row.Points[i].Y)) 714 return false; 715 } 716 // Exp, Power and Log Regression do not work with negative values 717 switch (row.VisualProperties.RegressionType) { 718 case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Exponential: 719 for (int i = 0; i < row.Points.Count; i++) { 720 if (row.Points[i].Y <= 0) 721 return false; 722 } 723 break; 724 case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Power: 725 for (int i = 0; i < row.Points.Count; i++) { 726 if (row.Points[i].X <= 0 || row.Points[i].Y <= 0) 727 return false; 728 } 729 break; 730 case ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Logarithmic: 731 for (int i = 0; i < row.Points.Count; i++) { 732 if (row.Points[i].X <= 0) 733 return false; 734 } 735 break; 736 } 700 737 return true; 701 738 }
Note: See TracChangeset
for help on using the changeset viewer.