Changeset 15097


Ignore:
Timestamp:
06/30/17 16:41:06 (4 months ago)
Author:
pfleck
Message:

#2713 #2715 #2765
Merged to stable

  • 14435-14439,14493,14516,14519,14982,14987,14992,15042 (from #2713)
  • 14457-14458,14508,14582,14740,14984,15068,15095 (from #2715)
  • 14860-14861 (from #2765)
Location:
stable
Files:
24 edited
4 copied

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Analysis

  • stable/HeuristicLab.Analysis.Views

  • stable/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.Designer.cs

    r14186 r15097  
    4949      this.colorButton = new System.Windows.Forms.Button();
    5050      this.startIndexZeroCheckBox = new System.Windows.Forms.CheckBox();
    51       this.binsNumericUpDown = new System.Windows.Forms.NumericUpDown();
    5251      this.label1 = new System.Windows.Forms.Label();
    5352      this.label2 = new System.Windows.Forms.Label();
    54       this.label3 = new System.Windows.Forms.Label();
    5553      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();
    5657      this.displayNameTextBox = new System.Windows.Forms.TextBox();
    5758      this.axisGroupBox = new System.Windows.Forms.GroupBox();
     59      this.panel2 = new System.Windows.Forms.Panel();
    5860      this.yAxisSecondaryRadioButton = new System.Windows.Forms.RadioButton();
     61      this.yAxisPrimaryRadioButton = new System.Windows.Forms.RadioButton();
     62      this.panel1 = new System.Windows.Forms.Panel();
    5963      this.xAxisPrimaryRadioButton = new System.Windows.Forms.RadioButton();
    60       this.yAxisPrimaryRadioButton = new System.Windows.Forms.RadioButton();
     64      this.xAxisSecondaryRadioButton = new System.Windows.Forms.RadioButton();
    6165      this.label5 = new System.Windows.Forms.Label();
    62       this.xAxisSecondaryRadioButton = new System.Windows.Forms.RadioButton();
    6366      this.label6 = new System.Windows.Forms.Label();
    6467      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();
    6868      this.lineChartGroupBox = new System.Windows.Forms.GroupBox();
    6969      this.lineWidthNumericUpDown = new System.Windows.Forms.NumericUpDown();
     
    7272      this.lineStyleComboBox = new System.Windows.Forms.ComboBox();
    7373      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();
    7774      this.commonGroupBox.SuspendLayout();
    7875      this.axisGroupBox.SuspendLayout();
    79       this.histoGramGroupBox.SuspendLayout();
     76      this.panel2.SuspendLayout();
     77      this.panel1.SuspendLayout();
    8078      this.lineChartGroupBox.SuspendLayout();
    8179      ((System.ComponentModel.ISupportInitialize)(this.lineWidthNumericUpDown)).BeginInit();
    82       this.panel1.SuspendLayout();
    83       this.panel2.SuspendLayout();
    8480      this.SuspendLayout();
    8581      //
     
    9086      this.chartTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    9187      this.chartTypeComboBox.FormattingEnabled = true;
    92       this.chartTypeComboBox.Location = new System.Drawing.Point(57, 45);
     88      this.chartTypeComboBox.Location = new System.Drawing.Point(102, 45);
    9389      this.chartTypeComboBox.Name = "chartTypeComboBox";
    94       this.chartTypeComboBox.Size = new System.Drawing.Size(264, 21);
     90      this.chartTypeComboBox.Size = new System.Drawing.Size(219, 21);
    9591      this.chartTypeComboBox.TabIndex = 3;
    9692      this.chartTypeComboBox.SelectedValueChanged += new System.EventHandler(this.chartTypeComboBox_SelectedValueChanged);
     
    10399      //
    104100      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);
    106102      this.colorButton.Name = "colorButton";
    107103      this.colorButton.Size = new System.Drawing.Size(23, 23);
     
    121117      this.startIndexZeroCheckBox.CheckedChanged += new System.EventHandler(this.startIndexZeroCheckBox_CheckedChanged);
    122118      //
    123       // binsNumericUpDown
    124       //
    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       //
    143119      // label1
    144120      //
     
    159135      this.label2.Text = "&Color:";
    160136      //
    161       // label3
    162       //
    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       //
    170137      // commonGroupBox
    171138      //
    172139      this.commonGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    173140            | 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);
    174144      this.commonGroupBox.Controls.Add(this.displayNameTextBox);
    175145      this.commonGroupBox.Controls.Add(this.axisGroupBox);
     
    181151      this.commonGroupBox.Location = new System.Drawing.Point(0, 0);
    182152      this.commonGroupBox.Name = "commonGroupBox";
    183       this.commonGroupBox.Size = new System.Drawing.Size(327, 174);
     153      this.commonGroupBox.Size = new System.Drawing.Size(327, 199);
    184154      this.commonGroupBox.TabIndex = 0;
    185155      this.commonGroupBox.TabStop = false;
    186156      this.commonGroupBox.Text = "Common";
    187157      //
     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      //
    188194      // displayNameTextBox
    189195      //
    190196      this.displayNameTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    191197            | 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);
    193199      this.displayNameTextBox.Name = "displayNameTextBox";
    194       this.displayNameTextBox.Size = new System.Drawing.Size(264, 20);
     200      this.displayNameTextBox.Size = new System.Drawing.Size(219, 20);
    195201      this.displayNameTextBox.TabIndex = 1;
    196202      this.displayNameTextBox.Validated += new System.EventHandler(this.displayNameTextBox_Validated);
     
    205211      this.axisGroupBox.Controls.Add(this.label5);
    206212      this.axisGroupBox.Controls.Add(this.label6);
    207       this.axisGroupBox.Location = new System.Drawing.Point(6, 101);
     213      this.axisGroupBox.Location = new System.Drawing.Point(6, 126);
    208214      this.axisGroupBox.Name = "axisGroupBox";
    209215      this.axisGroupBox.Size = new System.Drawing.Size(315, 67);
     
    211217      this.axisGroupBox.TabStop = false;
    212218      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;
    213230      //
    214231      // yAxisSecondaryRadioButton
     
    224241      this.yAxisSecondaryRadioButton.CheckedChanged += new System.EventHandler(this.yAxisRadioButton_CheckedChanged);
    225242      //
     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      //
    226266      // xAxisPrimaryRadioButton
    227267      //
     
    236276      this.xAxisPrimaryRadioButton.CheckedChanged += new System.EventHandler(this.xAxisRadioButton_CheckedChanged);
    237277      //
    238       // yAxisPrimaryRadioButton
    239       //
    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       // label5
    251       //
    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       //
    259278      // xAxisSecondaryRadioButton
    260279      //
     
    269288      this.xAxisSecondaryRadioButton.CheckedChanged += new System.EventHandler(this.xAxisRadioButton_CheckedChanged);
    270289      //
     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      //
    271299      // label6
    272300      //
     
    287315      this.label9.Text = "&Name:";
    288316      //
    289       // histoGramGroupBox
    290       //
    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       // binsExactRadioButton
    305       //
    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       // binsApproximatelyRadioButton
    318       //
    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       //
    330317      // lineChartGroupBox
    331318      //
     
    338325      this.lineChartGroupBox.Controls.Add(this.lineStyleComboBox);
    339326      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);
    341328      this.lineChartGroupBox.Name = "lineChartGroupBox";
    342329      this.lineChartGroupBox.Size = new System.Drawing.Size(327, 94);
     
    404391      this.label8.Text = "&Style:";
    405392      //
    406       // panel1
    407       //
    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       // panel2
    418       //
    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       //
    428393      // DataRowVisualPropertiesControl
    429394      //
    430       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    431395      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    432396      this.Controls.Add(this.lineChartGroupBox);
    433       this.Controls.Add(this.histoGramGroupBox);
    434397      this.Controls.Add(this.commonGroupBox);
    435398      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);
    438400      this.commonGroupBox.ResumeLayout(false);
    439401      this.commonGroupBox.PerformLayout();
    440402      this.axisGroupBox.ResumeLayout(false);
    441403      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();
    444408      this.lineChartGroupBox.ResumeLayout(false);
    445409      this.lineChartGroupBox.PerformLayout();
    446410      ((System.ComponentModel.ISupportInitialize)(this.lineWidthNumericUpDown)).EndInit();
    447       this.panel1.ResumeLayout(false);
    448       this.panel1.PerformLayout();
    449       this.panel2.ResumeLayout(false);
    450       this.panel2.PerformLayout();
    451411      this.ResumeLayout(false);
    452412
     
    459419    private System.Windows.Forms.Button colorButton;
    460420    private System.Windows.Forms.CheckBox startIndexZeroCheckBox;
    461     private System.Windows.Forms.NumericUpDown binsNumericUpDown;
    462421    private System.Windows.Forms.Label label1;
    463422    private System.Windows.Forms.Label label2;
    464     private System.Windows.Forms.Label label3;
    465423    private System.Windows.Forms.GroupBox commonGroupBox;
    466     private System.Windows.Forms.GroupBox histoGramGroupBox;
    467424    private System.Windows.Forms.RadioButton xAxisSecondaryRadioButton;
    468425    private System.Windows.Forms.RadioButton yAxisSecondaryRadioButton;
     
    474431    private System.Windows.Forms.Label label4;
    475432    private System.Windows.Forms.Label label7;
    476     private System.Windows.Forms.RadioButton binsExactRadioButton;
    477     private System.Windows.Forms.RadioButton binsApproximatelyRadioButton;
    478433    private System.Windows.Forms.ComboBox lineStyleComboBox;
    479434    private System.Windows.Forms.Label label8;
     
    484439    private System.Windows.Forms.Panel panel2;
    485440    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;
    486444  }
    487445}
  • stable/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.cs

    r14186 r15097  
    2323using System.Drawing;
    2424using System.Windows.Forms;
     25using HeuristicLab.Common.Resources;
    2526using HeuristicLab.MainForm;
    2627using HeuristicLab.MainForm.WindowsForms;
     
    4546      chartTypeComboBox.DataSource = Enum.GetValues(typeof(DataRowVisualProperties.DataRowChartType));
    4647      lineStyleComboBox.DataSource = Enum.GetValues(typeof(DataRowVisualProperties.DataRowLineStyle));
     48      clearColorButton.BackColor = Color.Transparent;
     49      clearColorButton.BackgroundImage = VSImageLibrary.Delete;
    4750      SetEnabledStateOfControls();
    4851    }
     
    6265          startIndexZeroCheckBox.Checked = false;
    6366          lineWidthNumericUpDown.Value = 1;
    64           binsNumericUpDown.Value = 1;
    65           binsApproximatelyRadioButton.Checked = false;
    66           binsExactRadioButton.Checked = false;
    6767          displayNameTextBox.Text = String.Empty;
    6868        } else {
     
    8686            lineWidthNumericUpDown.Value = lineWidthNumericUpDown.Maximum;
    8787          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;
    9588          displayNameTextBox.Text = Content.DisplayName;
     89          isVisibleInLegendCheckBox.Checked = Content.IsVisibleInLegend;
    9690        }
    9791      } finally { SuppressEvents = false; }
     
    10195    protected virtual void SetEnabledStateOfControls() {
    10296      commonGroupBox.Enabled = Content != null;
     97      clearColorButton.Visible = Content != null && !Content.Color.IsEmpty;
    10398      lineChartGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Line;
    104       histoGramGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Histogram;
     99      isVisibleInLegendCheckBox.Enabled = Content != null;
    105100    }
    106101
     
    126121        colorButton.BackColor = Content.Color;
    127122        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; }
    128136      }
    129137    }
     
    165173    }
    166174
    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 
    182175    private void displayNameTextBox_Validated(object sender, EventArgs e) {
    183176      if (!SuppressEvents && Content != null) {
     
    188181      }
    189182    }
     183
     184    private void isVisibleInLegendCheckBox_CheckedChanged(object sender, EventArgs e) {
     185      if (!SuppressEvents && Content != null) {
     186        Content.IsVisibleInLegend = isVisibleInLegendCheckBox.Checked;
     187      }
     188    }
    190189    #endregion
    191190  }
  • stable/HeuristicLab.Analysis.Views/3.3/DataTableView.Designer.cs

    r14982 r15097  
    107107      this.configureToolStripMenuItem.Name = "configureToolStripMenuItem";
    108108      this.configureToolStripMenuItem.Size = new System.Drawing.Size(256, 22);
    109       this.configureToolStripMenuItem.Text = "Configure Chart";
     109      this.configureToolStripMenuItem.Text = "Configure Chart...";
    110110      this.configureToolStripMenuItem.Click += new System.EventHandler(this.configureToolStripMenuItem_Click);
    111111      //
  • stable/HeuristicLab.Analysis.Views/3.3/DataTableView.cs

    r14982 r15097  
    3636    protected List<Series> invisibleSeries;
    3737    protected Dictionary<IObservableList<double>, DataRow> valuesRowsTable;
     38    protected bool showChartOnly = false;
    3839
    3940    public new DataTable Content {
     
    4243    }
    4344
    44     public bool ShowName {
    45       get { return nameTextBox.Visible; }
     45    public bool ShowChartOnly {
     46      get { return showChartOnly; }
    4647      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();
    5351        }
    5452      }
     
    133131      } else MessageBox.Show("Nothing to configure.");
    134132    }
     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
    135146    protected virtual void AddDataRows(IEnumerable<DataRow> rows) {
    136147      foreach (var row in rows) {
     
    195206          break;
    196207        case DataRowVisualProperties.DataRowChartType.Histogram:
    197           bool stacked = row.VisualProperties.Aggregation == DataRowVisualProperties.DataRowHistogramAggregation.Stacked;
     208          bool stacked = Content.VisualProperties.HistogramAggregation == DataTableVisualProperties.DataTableHistogramAggregation.Stacked;
    198209          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;
    200211          series.SetCustomProperty("DrawSideBySide", sideBySide ? "True" : "False");
    201212          series.SetCustomProperty("PointWidth", "1");
     
    319330    private bool RequiresTransparency(DataRow row) {
    320331      return row.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Histogram
    321              && row.VisualProperties.Aggregation == DataRowVisualProperties.DataRowHistogramAggregation.Overlapping;
     332             && Content.VisualProperties.HistogramAggregation == DataTableVisualProperties.DataTableHistogramAggregation.Overlapping;
    322333    }
    323334
     
    338349        ConfigureChartArea(chart.ChartAreas[0]);
    339350        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
    340356      }
    341357    }
     
    551567      switch (row.VisualProperties.ChartType) {
    552568        case DataRowVisualProperties.DataRowChartType.Histogram:
    553           // when a single histogram is updated, all histograms must be updated. otherwise the value ranges and bin sizes may not be equal.
     569          // when a single histogram is updated, all histograms must be updated. otherwise the value ranges may not be equal.
    554570          var histograms = Content.Rows
    555571            .Where(r => r.VisualProperties.ChartType == DataRowVisualProperties.DataRowChartType.Histogram)
     
    595611      if (!validValues.Any()) return;
    596612
    597       int bins = histogramRows.Max(r => r.VisualProperties.Bins);
     613      int bins = Content.VisualProperties.HistogramBins;
    598614      decimal minValue = (decimal)validValues.Min();
    599615      decimal maxValue = (decimal)validValues.Max();
     
    605621      }
    606622
    607       if (!histogramRows.Any(r => r.VisualProperties.ExactBins)) {
     623      if (!Content.VisualProperties.HistogramExactBins) {
    608624        intervalWidth = (decimal)HumanRoundRange((double)intervalWidth);
    609625        minValue = Math.Floor(minValue / intervalWidth) * intervalWidth;
  • stable/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesControl.Designer.cs

    r14186 r15097  
    105105      this.label7 = new System.Windows.Forms.Label();
    106106      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();
    107115      this.titleTextBox = new System.Windows.Forms.TextBox();
    108116      this.label15 = new System.Windows.Forms.Label();
     
    131139      this.panel6.SuspendLayout();
    132140      this.panel5.SuspendLayout();
     141      this.histogramTabPage.SuspendLayout();
     142      this.histogramGroupBox.SuspendLayout();
     143      ((System.ComponentModel.ISupportInitialize)(this.histogramBinsNumericUpDown)).BeginInit();
    133144      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    134145      this.SuspendLayout();
     
    489500      this.axisTabControl.Controls.Add(this.xAxisTabPage);
    490501      this.axisTabControl.Controls.Add(this.yAxisTabPage);
     502      this.axisTabControl.Controls.Add(this.histogramTabPage);
    491503      this.axisTabControl.Location = new System.Drawing.Point(0, 84);
    492504      this.axisTabControl.Name = "axisTabControl";
     
    791803      this.label8.TabIndex = 2;
    792804      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);
    793908      //
    794909      // titleTextBox
     
    9271042      this.panel5.ResumeLayout(false);
    9281043      this.panel5.PerformLayout();
     1044      this.histogramTabPage.ResumeLayout(false);
     1045      this.histogramGroupBox.ResumeLayout(false);
     1046      this.histogramGroupBox.PerformLayout();
     1047      ((System.ComponentModel.ISupportInitialize)(this.histogramBinsNumericUpDown)).EndInit();
    9291048      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    9301049      this.ResumeLayout(false);
     
    10051124    private System.Windows.Forms.CheckBox yAxisSecondaryLogScaleCheckBox;
    10061125    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;
    10071134  }
    10081135}
  • stable/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesControl.cs

    r14186 r15097  
    2020#endregion
    2121
     22using System;
     23using System.Drawing;
     24using System.Windows.Forms;
    2225using HeuristicLab.MainForm;
    2326using HeuristicLab.MainForm.WindowsForms;
    24 using System.Drawing;
    25 using System.Windows.Forms;
    2627
    2728namespace HeuristicLab.Analysis.Views {
     
    5859      errorProvider.SetIconPadding(yAxisSecondaryMinimumFixedTextBox, 2);
    5960      errorProvider.SetIconPadding(yAxisSecondaryMaximumFixedTextBox, 2);
     61      histogramAggregationComboBox.DataSource = Enum.GetValues(typeof(DataTableVisualProperties.DataTableHistogramAggregation));
    6062    }
    6163
     
    101103          yAxisSecondaryMaximumFixedTextBox.Text = string.Empty;
    102104          yAxisSecondaryLogScaleCheckBox.Checked = false;
     105
     106          histogramBinsNumericUpDown.Value = 1;
     107          histogramBinsApproximatelyRadioButton.Checked = false;
     108          histogramBinsExactRadioButton.Checked = false;
     109          histogramAggregationComboBox.SelectedIndex = -1;
    103110        } else {
    104111          titleFontLabel.Text = "( " + FormatFont(Content.TitleFont) + " )";
     
    139146          yAxisSecondaryMaximumFixedTextBox.Text = Content.SecondYAxisMaximumFixedValue.ToString();
    140147          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;
    141157        }
    142158      } finally { SuppressEvents = false; }
     
    483499      }
    484500    }
     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    }
    485525    #endregion
    486526
  • stable/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesDialog.Designer.cs

    r14186 r15097  
    6969      this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    7070      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, 425);
     71      this.okButton.Location = new System.Drawing.Point(325, 454);
    7272      this.okButton.Name = "okButton";
    7373      this.okButton.Size = new System.Drawing.Size(75, 23);
     
    8181      this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    8282      this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
    83       this.cancelButton.Location = new System.Drawing.Point(406, 425);
     83      this.cancelButton.Location = new System.Drawing.Point(406, 454);
    8484      this.cancelButton.Name = "cancelButton";
    8585      this.cancelButton.Size = new System.Drawing.Size(75, 23);
     
    9999      this.tabControl.Name = "tabControl";
    100100      this.tabControl.SelectedIndex = 0;
    101       this.tabControl.Size = new System.Drawing.Size(469, 407);
     101      this.tabControl.Size = new System.Drawing.Size(469, 436);
    102102      this.tabControl.TabIndex = 2;
    103103      //
     
    108108      this.seriesTabPage.Name = "seriesTabPage";
    109109      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);
    111111      this.seriesTabPage.TabIndex = 0;
    112112      this.seriesTabPage.Text = "Series";
     
    133133      this.splitContainer.Panel2.Controls.Add(this.dataRowVisualPropertiesControl);
    134134      this.splitContainer.Panel2MinSize = 50;
    135       this.splitContainer.Size = new System.Drawing.Size(461, 381);
     135      this.splitContainer.Size = new System.Drawing.Size(461, 410);
    136136      this.splitContainer.SplitterDistance = 125;
    137137      this.splitContainer.TabIndex = 0;
     
    169169      this.seriesListView.Name = "seriesListView";
    170170      this.seriesListView.ShowGroups = false;
    171       this.seriesListView.Size = new System.Drawing.Size(119, 346);
     171      this.seriesListView.Size = new System.Drawing.Size(119, 375);
    172172      this.seriesListView.TabIndex = 2;
    173173      this.seriesListView.UseCompatibleStateImageBehavior = false;
     
    183183      this.dataRowVisualPropertiesControl.Location = new System.Drawing.Point(3, 26);
    184184      this.dataRowVisualPropertiesControl.Name = "dataRowVisualPropertiesControl";
    185       this.dataRowVisualPropertiesControl.Size = new System.Drawing.Size(326, 352);
     185      this.dataRowVisualPropertiesControl.Size = new System.Drawing.Size(326, 381);
    186186      this.dataRowVisualPropertiesControl.TabIndex = 0;
    187187      //
     
    213213      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    214214      this.CancelButton = this.cancelButton;
    215       this.ClientSize = new System.Drawing.Size(493, 460);
     215      this.ClientSize = new System.Drawing.Size(493, 489);
    216216      this.Controls.Add(this.tabControl);
    217217      this.Controls.Add(this.cancelButton);
  • stable/HeuristicLab.Analysis.Views/3.3/HeuristicLab.Analysis.Views-3.3.csproj

    r11920 r15097  
    105105  </PropertyGroup>
    106106  <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>
    107111    <Reference Include="System" />
    108112    <Reference Include="System.Core">
     
    122126  </ItemGroup>
    123127  <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>
    124140    <Compile Include="ScatterPlotVisualPropertiesDialog.cs">
    125141      <SubType>Form</SubType>
     
    140156      <DependentUpon>ScatterPlotDataRowVisualPropertiesControl.cs</DependentUpon>
    141157    </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>
    148158    <Compile Include="ScatterPlotHistoryView.cs">
    149159      <SubType>UserControl</SubType>
     
    209219    <Compile Include="Plugin.cs" />
    210220    <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>
    217221    <Compile Include="HistogramControl.cs">
    218222      <SubType>UserControl</SubType>
  • stable/HeuristicLab.Analysis.Views/3.3/Plugin.cs.frame

    r14190 r15097  
    2828  [Plugin("HeuristicLab.Analysis.Views", "3.3.14.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Analysis.Views-3.3.dll", PluginFileType.Assembly)]
     30  [PluginDependency("HeuristicLab.ALGLIB", "3.7.0")]
    3031  [PluginDependency("HeuristicLab.Analysis", "3.3")]
    3132  [PluginDependency("HeuristicLab.Collections", "3.3")]
  • stable/HeuristicLab.Analysis.Views/3.3/ScatterPlotDataRowVisualPropertiesControl.Designer.cs

    r14186 r15097  
    4545    /// </summary>
    4646    private void InitializeComponent() {
     47      this.components = new System.ComponentModel.Container();
    4748      this.pointStyleComboBox = new System.Windows.Forms.ComboBox();
    4849      this.colorDialog = new System.Windows.Forms.ColorDialog();
     
    5657      this.label9 = new System.Windows.Forms.Label();
    5758      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();
    5868      ((System.ComponentModel.ISupportInitialize)(this.pointSizeNumericUpDown)).BeginInit();
     69      this.regressionGroupBox.SuspendLayout();
     70      ((System.ComponentModel.ISupportInitialize)(this.polynomialRegressionOrderNumericUpDown)).BeginInit();
    5971      this.SuspendLayout();
    6072      //
     
    171183      this.label7.Text = "&Visible in Legend:";
    172184      //
     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      //
    173297      // ScatterPlotDataRowVisualPropertiesControl
    174298      //
    175299      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
     300      this.Controls.Add(this.clearColorButton);
     301      this.Controls.Add(this.regressionGroupBox);
    176302      this.Controls.Add(this.pointSizeNumericUpDown);
    177303      this.Controls.Add(this.isVisibleInLegendCheckBox);
     
    185311      this.Controls.Add(this.colorButton);
    186312      this.Name = "ScatterPlotDataRowVisualPropertiesControl";
    187       this.Size = new System.Drawing.Size(342, 135);
     313      this.Size = new System.Drawing.Size(342, 215);
    188314      ((System.ComponentModel.ISupportInitialize)(this.pointSizeNumericUpDown)).EndInit();
     315      this.regressionGroupBox.ResumeLayout(false);
     316      this.regressionGroupBox.PerformLayout();
     317      ((System.ComponentModel.ISupportInitialize)(this.polynomialRegressionOrderNumericUpDown)).EndInit();
    189318      this.ResumeLayout(false);
    190319      this.PerformLayout();
     
    205334    private System.Windows.Forms.Label label9;
    206335    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;
    207345  }
    208346}
  • stable/HeuristicLab.Analysis.Views/3.3/ScatterPlotDataRowVisualPropertiesControl.cs

    r14186 r15097  
    2323using System.Drawing;
    2424using System.Windows.Forms;
     25using HeuristicLab.Common.Resources;
    2526using HeuristicLab.MainForm;
    2627using HeuristicLab.MainForm.WindowsForms;
     
    4445      InitializeComponent();
    4546      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;
    4650      SetEnabledStateOfControls();
    4751    }
     
    5761          pointSizeNumericUpDown.Value = 1;
    5862          displayNameTextBox.Text = String.Empty;
     63          regressionTypeComboBox.SelectedIndex = -1;
     64          polynomialRegressionOrderNumericUpDown.Value = 2;
     65          isRegressionVisibleInLegendCheckBox.Checked = false;
     66          regressionLegendTextBox.Text = string.Empty;
    5967        } else {
    6068          displayNameTextBox.Text = Content.DisplayName;
     
    6977          pointSizeNumericUpDown.Value = Content.PointSize;
    7078          isVisibleInLegendCheckBox.Checked = Content.IsVisibleInLegend;
     79          regressionTypeComboBox.SelectedItem = Content.RegressionType;
     80          polynomialRegressionOrderNumericUpDown.Value = Content.PolynomialRegressionOrder;
     81          isRegressionVisibleInLegendCheckBox.Checked = Content.IsRegressionVisibleInLegend;
     82          regressionLegendTextBox.Text = content.RegressionDisplayName;
    7183        }
    7284      }
     
    7890      pointStyleComboBox.Enabled = Content != null;
    7991      colorButton.Enabled = Content != null;
    80       colorButton.Enabled = Content != null;
     92      clearColorButton.Visible = Content != null && !Content.Color.IsEmpty;
    8193      isVisibleInLegendCheckBox.Enabled = Content != null;
    8294      pointSizeNumericUpDown.Enabled = Content != null;
    8395      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;
    84101    }
    85102
     
    87104    private void pointStyleComboBox_SelectedValueChanged(object sender, EventArgs e) {
    88105      if (!SuppressEvents && Content != null) {
    89         ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle selected = (ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle)pointStyleComboBox.SelectedValue;
     106        var selected = (ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle)pointStyleComboBox.SelectedValue;
    90107        Content.PointStyle = selected;
    91108      }
     
    97114        colorButton.BackColor = Content.Color;
    98115        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;
    99126      }
    100127    }
     
    121148      }
    122149    }
     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    }
    123176    #endregion
    124177  }
  • stable/HeuristicLab.Analysis.Views/3.3/ScatterPlotView.Designer.cs

    r14982 r15097  
    6969      // chart
    7070      //
    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)
    7373            | System.Windows.Forms.AnchorStyles.Right)));
    7474      this.chart.BorderlineColor = System.Drawing.Color.Black;
     
    107107      this.configureToolStripMenuItem.Name = "configureToolStripMenuItem";
    108108      this.configureToolStripMenuItem.Size = new System.Drawing.Size(256, 22);
    109       this.configureToolStripMenuItem.Text = "Configure Chart";
     109      this.configureToolStripMenuItem.Text = "Configure Chart...";
    110110      this.configureToolStripMenuItem.Click += new System.EventHandler(this.configureToolStripMenuItem_Click);
    111111      //
  • stable/HeuristicLab.Analysis.Views/3.3/ScatterPlotView.cs

    r14982 r15097  
    571571
    572572      double[] coefficients;
    573       if (!Fitting(row, out coefficients))
     573      if (!Fitting(row, out coefficients)) {
     574        regressionSeries.LegendToolTip = "Could not calculate regression.";
    574575        return;
     576      }
    575577
    576578      // 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        }
    582585      }
    583586
     
    657660
    658661    protected static bool Fitting(ScatterPlotDataRow row, out double[] coefficients) {
     662      if (!IsValidRegressionData(row)) {
     663        coefficients = new double[0];
     664        return false;
     665      }
     666
    659667      var xs = row.Points.Select(p => p.X).ToList();
    660668      var ys = row.Points.Select(p => p.Y).ToList();
     
    688696      // Linear fitting
    689697      bool success = LinearFitting(matrix, nRows, out coefficients);
    690       if (!success) return success;
     698      if (!success) return false;
    691699
    692700      // Output transformation
     
    698706      }
    699707
     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      }
    700737      return true;
    701738    }
  • stable/HeuristicLab.Analysis/3.3/DataVisualization/DataRowVisualProperties.cs

    r14186 r15097  
    123123      }
    124124    }
    125     private int bins;
    126     public int Bins {
    127       get { return bins; }
    128       set {
    129         if (bins != value) {
    130           bins = value;
    131           OnPropertyChanged("Bins");
    132         }
    133       }
    134     }
    135     private bool exactBins;
    136     public bool ExactBins {
    137       get { return exactBins; }
    138       set {
    139         if (exactBins != value) {
    140           exactBins = value;
    141           OnPropertyChanged("ExactBins");
    142         }
    143       }
    144     }
     125
    145126    private double scaleFactor;
    146127    public double ScaleFactor {
     
    215196      set { lineWidth = value; }
    216197    }
    217     [Storable(Name = "Bins")]
    218     private int StorableBins {
    219       get { return bins; }
    220       set { bins = value; }
    221     }
    222     [Storable(Name = "ExactBins")]
    223     private bool StorableExactBins {
    224       get { return exactBins; }
    225       set { exactBins = value; }
    226     }
    227198    [Storable(Name = "ScaleFactor")]
    228199    private double StorableScaleFactor {
     
    240211      set { displayName = value; }
    241212    }
     213    #endregion
     214
     215    #region Histogram Properties - Backwards Compatability
     216    internal enum DataRowHistogramAggregation {
     217      Overlapping,
     218      SideBySide,
     219      Stacked
     220    }
     221
     222    internal int? Bins { get; private set; }
     223    internal bool? ExactBins { get; private set; }
     224    internal DataRowHistogramAggregation? Aggregation { get; private set; }
     225
     226    [Storable(Name = "Bins", AllowOneWay = true)]
     227    private int StorableBins { set { Bins = value; } }
     228    [Storable(Name = "ExactBins", AllowOneWay = true)]
     229    private bool StorableExactBins { set { ExactBins = value; } }
     230    [Storable(Name = "Aggregation", AllowOneWay = true)]
     231    private DataRowHistogramAggregation StorableAggregation { set { Aggregation = value; } }
    242232    #endregion
    243233
     
    253243      this.startIndexZero = original.startIndexZero;
    254244      this.lineWidth = original.lineWidth;
    255       this.bins = original.bins;
    256       this.exactBins = original.exactBins;
    257245      this.scaleFactor = original.scaleFactor;
    258246      this.displayName = original.displayName;
     
    267255      startIndexZero = false;
    268256      lineWidth = 1;
    269       bins = 10;
    270       exactBins = false;
    271257      scaleFactor = 1.0;
    272258      displayName = String.Empty;
     
    294280      if (secondXAxis == default(bool)
    295281        && lineStyle == default(DataRowLineStyle)
    296         && lineWidth == default(int) && bins == default(int) && exactBins == default(bool)
    297282        && displayName == default(string)) {
    298283        secondXAxis = false;
    299284        lineStyle = DataRowLineStyle.Solid;
    300285        lineWidth = 1;
    301         bins = 10;
    302         exactBins = false;
    303286        displayName = String.Empty;
    304287      }
  • stable/HeuristicLab.Analysis/3.3/DataVisualization/DataTable.cs

    r14186 r15097  
    112112      if (VisualProperties == null) VisualProperties = new DataTableVisualProperties(name);
    113113      if (VisualProperties.Title == null) VisualProperties.Title = name;
     114
     115      #region Backwards Compatability Histogram Visual Properties
     116      var rowProperties = Rows.Select(r => r.VisualProperties).ToList();
     117      if (rowProperties.Any(r => r.Bins.HasValue))
     118        VisualProperties.HistogramBins = rowProperties.Where(r => r.Bins.HasValue).Max(r => r.Bins.Value);
     119      if (rowProperties.Any(r => r.ExactBins.HasValue))
     120        VisualProperties.HistogramExactBins = rowProperties.Where(r => r.ExactBins.HasValue).Any(r => r.ExactBins.Value);
     121      if (rowProperties.Any(r => r.Aggregation.HasValue)) {
     122        var maxOccurrence = rowProperties
     123          .Where(r => r.Aggregation.HasValue).Select(r => r.Aggregation.Value)
     124          .GroupBy(x => x).OrderByDescending(x => x.Count())
     125          .First().Key;
     126        VisualProperties.HistogramAggregation = (DataTableVisualProperties.DataTableHistogramAggregation)maxOccurrence;
     127      }
     128      #endregion
    114129    }
    115130    #endregion
  • stable/HeuristicLab.Analysis/3.3/DataVisualization/DataTableVisualProperties.cs

    r14186 r15097  
    2020#endregion
    2121
     22using System;
     23using System.ComponentModel;
     24using System.Drawing;
    2225using HeuristicLab.Common;
    2326using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    24 using System.ComponentModel;
    25 using System.Drawing;
    2627
    2728namespace HeuristicLab.Analysis {
     
    3132  [StorableClass]
    3233  public class DataTableVisualProperties : DeepCloneable, INotifyPropertyChanged {
     34
     35    #region Histogram Aggregation
     36    public enum DataTableHistogramAggregation {
     37      Overlapping,
     38      SideBySide,
     39      Stacked
     40    }
     41    #endregion
     42
    3343    private Font titleFont;
    3444    public Font TitleFont {
     
    352362        secondYAxisLogScale = value;
    353363        OnPropertyChanged("SecondYAxisLogScale");
     364      }
     365    }
     366
     367    private int histogramBins;
     368    public int HistogramBins {
     369      get { return histogramBins; }
     370      set {
     371        if (histogramBins != value) {
     372          histogramBins = value;
     373          OnPropertyChanged("HistogramBins");
     374        }
     375      }
     376    }
     377
     378    private bool histogramExactBins;
     379    public bool HistogramExactBins {
     380      get { return histogramExactBins; }
     381      set {
     382        if (histogramExactBins != value) {
     383          histogramExactBins = value;
     384          OnPropertyChanged("HistogramExactBins");
     385        }
     386      }
     387    }
     388
     389    private DataTableHistogramAggregation histogramAggregation;
     390    public DataTableHistogramAggregation HistogramAggregation {
     391      get { return histogramAggregation; }
     392      set {
     393        if (histogramAggregation != value) {
     394          histogramAggregation = value;
     395          OnPropertyChanged("HistogramAggregation");
     396        }
    354397      }
    355398    }
     
    500543      get { return secondYAxisLogScale; }
    501544      set { secondYAxisLogScale = value; }
     545    }
     546    [Storable(Name = "HistogramBins", DefaultValue = 10)]
     547    private int StorableHistogramBins {
     548      get { return histogramBins; }
     549      set { histogramBins = value; }
     550    }
     551    [Storable(Name = "HistogramExactBins", DefaultValue = false)]
     552    private bool StorableHistogramExactBins {
     553      get { return histogramExactBins; }
     554      set { histogramExactBins = value; }
     555    }
     556    [Storable(Name = "HistogramAggregation", DefaultValue = DataTableHistogramAggregation.Overlapping)]
     557    private DataTableHistogramAggregation StorableHistogramAggregation {
     558      get { return histogramAggregation; }
     559      set { histogramAggregation = value; }
    502560    }
    503561    #endregion
     
    536594      this.yAxisLogScale = original.yAxisLogScale;
    537595      this.secondYAxisLogScale = original.secondYAxisLogScale;
     596      this.histogramBins = original.histogramBins;
     597      this.histogramExactBins = original.histogramExactBins;
     598      this.histogramAggregation = original.histogramAggregation;
    538599    }
    539600    public DataTableVisualProperties() {
     
    565626      this.yAxisLogScale = false;
    566627      this.secondYAxisLogScale = false;
     628      histogramBins = 10;
     629      histogramExactBins = false;
     630      histogramAggregation = DataTableHistogramAggregation.Overlapping;
    567631    }
    568632    public DataTableVisualProperties(string title)
  • stable/HeuristicLab.Analysis/3.3/DataVisualization/ScatterPlotDataRowVisualProperties.cs

    r14186 r15097  
    4545    }
    4646    #endregion
     47    #region
     48    public enum ScatterPlotDataRowRegressionType {
     49      None,
     50      Linear,
     51      Polynomial,
     52      Exponential,
     53      Logarithmic,
     54      Power
     55    }
     56    #endregion
    4757
    4858    private Color color;
     
    101111      }
    102112    }
     113    private ScatterPlotDataRowRegressionType regressionType;
     114    public ScatterPlotDataRowRegressionType RegressionType {
     115      get { return regressionType; }
     116      set {
     117        if (regressionType != value) {
     118          regressionType = value;
     119          OnPropertyChanged("RegressionType");
     120        }
     121      }
     122    }
     123    private int polynomialRegressionOrder;
     124    public int PolynomialRegressionOrder {
     125      get { return polynomialRegressionOrder; }
     126      set {
     127        if (polynomialRegressionOrder != value) {
     128          polynomialRegressionOrder = value;
     129          OnPropertyChanged("PolynomialRegressionOrder");
     130        }
     131      }
     132    }
     133    private bool isRegressionVisibleInLegend;
     134    public bool IsRegressionVisibleInLegend {
     135      get { return isRegressionVisibleInLegend; }
     136      set {
     137        if (isRegressionVisibleInLegend != value) {
     138          isRegressionVisibleInLegend = value;
     139          OnPropertyChanged("IsRegressionVisibleInLegend");
     140        }
     141      }
     142    }
     143    private string regressionDisplayName;
     144    public string RegressionDisplayName {
     145      get { return regressionDisplayName ?? string.Empty; }
     146      set {
     147        if (regressionDisplayName != value) {
     148          if (value == null && regressionDisplayName != string.Empty) {
     149            regressionDisplayName = string.Empty;
     150            OnPropertyChanged("RegressionDisplayName");
     151          } else if (value != null) {
     152            regressionDisplayName = value;
     153            OnPropertyChanged("RegressionDisplayName");
     154          }
     155        }
     156      }
     157    }
    103158
    104159    #region Persistence Properties
     
    127182      get { return displayName; }
    128183      set { displayName = value; }
     184    }
     185    [Storable(Name = "RegressionType")]
     186    private ScatterPlotDataRowRegressionType StorableRegressionType {
     187      get { return regressionType; }
     188      set { regressionType = value; }
     189    }
     190    [Storable(Name = "PolynomialRegressionOrder", DefaultValue = 2)]
     191    private int StorablePolynomialRegressionOrder {
     192      get { return polynomialRegressionOrder; }
     193      set { polynomialRegressionOrder = value; }
     194    }
     195    [Storable(Name = "IsRegressionVisibleInLegend", DefaultValue = true)]
     196    private bool StorableIsRegressionVisibleInLegend {
     197      get { return isRegressionVisibleInLegend; }
     198      set { isRegressionVisibleInLegend = value; }
     199    }
     200    [Storable(Name = "RegressionDisplayName")]
     201    private string StorableRegressionDisplayName {
     202      get { return regressionDisplayName; }
     203      set { regressionDisplayName = value; }
    129204    }
    130205    #endregion
     
    139214      this.displayName = original.displayName;
    140215      this.isVisibleInLegend = original.isVisibleInLegend;
     216      this.regressionType = original.regressionType;
     217      this.polynomialRegressionOrder = original.polynomialRegressionOrder;
     218      this.isRegressionVisibleInLegend = original.isRegressionVisibleInLegend;
     219      this.regressionDisplayName = original.regressionDisplayName;
    141220    }
    142221    public ScatterPlotDataRowVisualProperties() {
     
    146225      displayName = String.Empty;
    147226      isVisibleInLegend = true;
     227      regressionType = ScatterPlotDataRowRegressionType.None;
     228      polynomialRegressionOrder = 2;
     229      isRegressionVisibleInLegend = true;
     230      regressionDisplayName = string.Empty;
    148231    }
    149232    public ScatterPlotDataRowVisualProperties(string displayName)
  • stable/HeuristicLab.Common/3.3/Point2D.cs

    r14186 r15097  
    2626namespace HeuristicLab.Common {
    2727  [Serializable]
    28   public struct Point2D<T> where T : struct {
     28  public struct Point2D<T> where T : struct, IEquatable<T> {
    2929    public static readonly Point2D<T> Empty = new Point2D<T>();
    3030
     
    3838    }
    3939
     40    private object tag;
     41    public object Tag {
     42      get { return tag; }
     43    }
     44
    4045    [Browsable(false)]
    4146    public bool IsEmpty {
     
    4348    }
    4449
    45     public Point2D(T x, T y) {
     50    public Point2D(T x, T y, object tag = null) {
    4651      this.x = x;
    4752      this.y = y;
     53      this.tag = tag;
    4854    }
    4955
    5056    public static bool operator ==(Point2D<T> left, Point2D<T> right) {
    51       return left.x.Equals(right.x) && left.y.Equals(right.y);
     57      return left.x.Equals(right.x) && left.y.Equals(right.y) && left.tag == right.tag;
    5258    }
    5359    public static bool operator !=(Point2D<T> left, Point2D<T> right) {
     
    5965        return false;
    6066      Point2D<T> point = (Point2D<T>)obj;
    61       return x.Equals(point.x) && y.Equals(point.y) && GetType().Equals(point.GetType());
     67      return GetType() == point.GetType() && x.Equals(point.x) && y.Equals(point.y) &&
     68             ((tag != null && tag.Equals(point.tag)) || tag == point.tag);
    6269    }
    6370    public override int GetHashCode() {
  • stable/HeuristicLab.DataPreprocessing.Views

  • stable/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingDataTableView.cs

    r14963 r15097  
    716716    private void AddPointsToHistogramSeries(Series series, DataRow row, List<double> values) {
    717717      if (!row.Values.Any()) return;
    718       int bins = row.VisualProperties.Bins;
     718      int bins = Content.VisualProperties.HistogramBins;
    719719
    720720      double minValue = GetMinimum(row.Values);
     
    728728
    729729
    730       if (!row.VisualProperties.ExactBins) {
     730      if (!Content.VisualProperties.HistogramExactBins) {
    731731        intervalWidth = HumanRoundRange(intervalWidth);
    732732        minValue = Math.Floor(minValue / intervalWidth) * intervalWidth;
  • stable/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding

  • stable/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Analyzers/SymbolicExpressionTreeLengthAnalyzer.cs

    r14186 r15097  
    185185
    186186        treeLengthsTableRow.VisualProperties.ChartType = DataRowVisualProperties.DataRowChartType.Histogram;
    187         treeLengthsTableRow.VisualProperties.ExactBins = false;
     187        treeLengthsTable.VisualProperties.HistogramExactBins = false;
    188188
    189189        int range = maxLength - minLength;
    190190        if (range == 0) range = 1;
    191191        // the following trick should result in an integer intervalWidth of 1,2,4,...
    192         treeLengthsTableRow.VisualProperties.Bins = range;
     192        treeLengthsTable.VisualProperties.HistogramBins = range;
    193193
    194194        if (maxLength <= 25) // [0,25]
  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression

  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4

  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectiveTrainingBestSolutionAnalyzer.cs

    r14804 r15097  
    144144
    145145      qualityToTreeSize.Rows.Clear();
    146       var trainingRow = new ScatterPlotDataRow("Training NMSE", "", sizeParetoFront.Select(x => new Point2D<double>(x.Model.SymbolicExpressionTree.Length, x.TrainingNormalizedMeanSquaredError)));
     146      var trainingRow = new ScatterPlotDataRow("Training NMSE", "", sizeParetoFront.Select(x => new Point2D<double>(x.Model.SymbolicExpressionTree.Length, x.TrainingNormalizedMeanSquaredError, x)));
    147147      trainingRow.VisualProperties.PointSize = 8;
    148148      qualityToTreeSize.Rows.Add(trainingRow);
     
    150150      if (AnalyzeTestError) {
    151151        var testRow = new ScatterPlotDataRow("Test NMSE", "",
    152           sizeParetoFront.Select(x => new Point2D<double>(x.Model.SymbolicExpressionTree.Length, x.TestNormalizedMeanSquaredError)));
     152          sizeParetoFront.Select(x => new Point2D<double>(x.Model.SymbolicExpressionTree.Length, x.TestNormalizedMeanSquaredError, x)));
    153153        testRow.VisualProperties.PointSize = 8;
    154154        qualityToTreeSize.Rows.Add(testRow);
Note: See TracChangeset for help on using the changeset viewer.