Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/30/17 16:41:06 (7 years 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:
11 edited
4 copied

Legend:

Unmodified
Added
Removed
  • stable

  • 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    }
Note: See TracChangeset for help on using the changeset viewer.