From db6d24a59b1c9a2e31de54eb176c41107cb3b5ba Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Thu, 21 Sep 2023 13:21:22 +0300 Subject: [PATCH 1/3] Adding functions --- instat/dlgHistogram.designer.vb | 33 ++++++++- instat/dlgHistogram.vb | 124 +++++++++++++++++++++++++++++--- 2 files changed, 144 insertions(+), 13 deletions(-) diff --git a/instat/dlgHistogram.designer.vb b/instat/dlgHistogram.designer.vb index 2b13fdbd1c5..46b7178c5f8 100644 --- a/instat/dlgHistogram.designer.vb +++ b/instat/dlgHistogram.designer.vb @@ -62,6 +62,8 @@ Partial Class dlgHistogram Me.ucrHistogramSelector = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() Me.ucrPnlOptions = New instat.UcrPanel() + Me.lblReorder = New System.Windows.Forms.Label() + Me.ucrInputAddReorder = New instat.ucrInputComboBox() Me.contextMenuStripOptions.SuspendLayout() Me.SuspendLayout() ' @@ -234,7 +236,7 @@ Partial Class dlgHistogram 'ucrSaveHist ' Me.ucrSaveHist.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrSaveHist.Location = New System.Drawing.Point(10, 311) + Me.ucrSaveHist.Location = New System.Drawing.Point(10, 342) Me.ucrSaveHist.Margin = New System.Windows.Forms.Padding(5) Me.ucrSaveHist.Name = "ucrSaveHist" Me.ucrSaveHist.Size = New System.Drawing.Size(322, 24) @@ -283,7 +285,7 @@ Partial Class dlgHistogram ' Me.ucrBase.AutoSize = True Me.ucrBase.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrBase.Location = New System.Drawing.Point(10, 334) + Me.ucrBase.Location = New System.Drawing.Point(10, 365) Me.ucrBase.Margin = New System.Windows.Forms.Padding(4) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(408, 52) @@ -298,12 +300,35 @@ Partial Class dlgHistogram Me.ucrPnlOptions.Size = New System.Drawing.Size(433, 30) Me.ucrPnlOptions.TabIndex = 0 ' + 'lblReorder + ' + Me.lblReorder.AutoSize = True + Me.lblReorder.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblReorder.Location = New System.Drawing.Point(286, 298) + Me.lblReorder.Name = "lblReorder" + Me.lblReorder.Size = New System.Drawing.Size(48, 13) + Me.lblReorder.TabIndex = 38 + Me.lblReorder.Text = "Reorder:" + ' + 'ucrInputAddReorder + ' + Me.ucrInputAddReorder.AddQuotesIfUnrecognised = True + Me.ucrInputAddReorder.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.ucrInputAddReorder.GetSetSelectedIndex = -1 + Me.ucrInputAddReorder.IsReadOnly = False + Me.ucrInputAddReorder.Location = New System.Drawing.Point(287, 314) + Me.ucrInputAddReorder.Name = "ucrInputAddReorder" + Me.ucrInputAddReorder.Size = New System.Drawing.Size(120, 21) + Me.ucrInputAddReorder.TabIndex = 39 + ' 'dlgHistogram ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True - Me.ClientSize = New System.Drawing.Size(448, 394) + Me.ClientSize = New System.Drawing.Size(448, 422) + Me.Controls.Add(Me.lblReorder) + Me.Controls.Add(Me.ucrInputAddReorder) Me.Controls.Add(Me.cmdOptions) Me.Controls.Add(Me.ucrChkDisplayAsDotPlot) Me.Controls.Add(Me.ucrChkRidges) @@ -355,4 +380,6 @@ Partial Class dlgHistogram Friend WithEvents toolStripMenuItemDensityRidgesOptions As ToolStripMenuItem Friend WithEvents toolStripMenuItemFrequencyPolygonOptions As ToolStripMenuItem Friend WithEvents toolStripMenuItemDotOptions As ToolStripMenuItem + Friend WithEvents lblReorder As Label + Friend WithEvents ucrInputAddReorder As ucrInputComboBox End Class \ No newline at end of file diff --git a/instat/dlgHistogram.vb b/instat/dlgHistogram.vb index 4d8fce75cc8..0cebbb3384c 100644 --- a/instat/dlgHistogram.vb +++ b/instat/dlgHistogram.vb @@ -43,6 +43,14 @@ Public Class dlgHistogram Private clsScaleFillViridisFunction As New RFunction Private clsScaleColourViridisFunction As New RFunction Private clsAnnotateFunction As New RFunction + Private clsForecatsReverse As New RFunction + Private clsForecatsInfreqValue As New RFunction + Private clsForecatsReverseValue As New RFunction + + Private ReadOnly strAscending As String = "Ascending" + Private ReadOnly strDescending As String = "Descending" + Private ReadOnly strReverse As String = "Reverse" + Private ReadOnly strNone As String = "None" 'Parameter names for geoms Private strFirstParameterName As String = "geomfunc" @@ -119,6 +127,10 @@ Public Class dlgHistogram ucrVariablesAsFactorforHist.bWithQuotes = False ucrVariablesAsFactorforHist.SetParameterIsString() + ucrInputAddReorder.SetItems({strAscending, strDescending, strReverse, strNone}) + ucrInputAddReorder.SetDropDownStyleAsNonEditable() + ucrInputAddReorder.SetLinkedDisplayControl(lblReorder) + ucrPnlOptions.AddToLinkedControls({ucrChkDisplayAsDotPlot}, {rdoHistogram}, bNewLinkedHideIfParameterMissing:=True) ucrPnlOptions.AddToLinkedControls({ucrChkRidges}, {rdoDensity_ridges}, bNewLinkedHideIfParameterMissing:=True) ucrChkRidges.AddToLinkedControls(ucrInputStats, {"FALSE"}, bNewLinkedHideIfParameterMissing:=True) @@ -139,6 +151,9 @@ Public Class dlgHistogram clsRaesFunction = New RFunction clsHistAesFunction = New RFunction clsPercentage = New RFunction + clsForecatsReverse = New RFunction + clsForecatsInfreqValue = New RFunction + clsForecatsReverseValue = New RFunction ucrHistogramSelector.Reset() ucrHistogramSelector.SetGgplotFunction(clsBaseOperator) ucrSaveHist.Reset() @@ -146,6 +161,9 @@ Public Class dlgHistogram bResetSubdialog = True bResetHistLayerSubdialog = True + ucrInputAddReorder.SetText(strNone) + ucrInputAddReorder.bUpdateRCodeFromControl = True + clsBaseOperator.SetOperation("+") clsBaseOperator.AddParameter("ggplot", clsRFunctionParameter:=clsRggplotFunction, iPosition:=0) clsBaseOperator.AddParameter(strFirstParameterName, clsRFunctionParameter:=clsRgeomPlotFunction, iPosition:=2) @@ -168,6 +186,15 @@ Public Class dlgHistogram clsPercentage.SetPackageName("scales") clsPercentage.SetRCommand("percent_format") + clsForecatsReverse.SetPackageName("forcats") + clsForecatsReverse.SetRCommand("fct_rev") + + clsForecatsReverseValue.SetPackageName("forcats") + clsForecatsReverseValue.SetRCommand("fct_rev") + + clsForecatsInfreqValue.SetPackageName("forcats") + clsForecatsInfreqValue.SetRCommand("fct_infreq") + clsBaseOperator.AddParameter(GgplotDefaults.clsDefaultThemeParameter.Clone()) clsXlabsFunction = GgplotDefaults.clsXlabTitleFunction.Clone() clsYlabFunction = GgplotDefaults.clsYlabTitleFunction.Clone() @@ -198,10 +225,10 @@ Public Class dlgHistogram ucrChkPercentages.SetRCode(clsYScalecontinuousFunction, bReset) ucrChkDisplayAsDotPlot.SetRCode(clsRgeomPlotFunction, bReset) ucrChkRidges.SetRCode(clsRgeomPlotFunction, bReset) - ucrFactorReceiver.SetRCode(clsRaesFunction, bReset) ucrVariablesAsFactorforHist.SetRCode(clsRaesFunction, bReset) If bReset Then ucrInputStats.SetRCode(clsHistAesFunction, bReset) + ucrFactorReceiver.SetRCode(clsRaesFunction, bReset) End If End Sub @@ -225,6 +252,8 @@ Public Class dlgHistogram clsHistAesFunction.RemoveParameterByName("y") clsHistAesFunction.AddParameter("y", "stat(count)", iPosition:=0) clsRgeomPlotFunction.SetPackageName("ggplot2") + ucrInputAddReorder.Visible = Not ucrFactorReceiver.IsEmpty() + If rdoHistogram.Checked Then If ucrChkDisplayAsDotPlot.Checked Then clsRgeomPlotFunction.SetRCommand("geom_dotplot") @@ -242,12 +271,14 @@ Public Class dlgHistogram clsHistAesFunction.AddParameter("y", clsRFunctionParameter:=ucrFactorReceiver.GetVariables(), iPosition:=2) clsRgeomPlotFunction.SetPackageName("ggridges") clsRgeomPlotFunction.SetRCommand("geom_density_ridges") + clsRgeomPlotFunction.RemoveParameterByName("mapping") If Not ucrSaveHist.bUserTyped Then ucrSaveHist.SetPrefix("density_ridges") End If Else ucrFactorReceiver.ChangeParameterName("colour") clsRgeomPlotFunction.SetRCommand("geom_density") + clsRgeomPlotFunction.AddParameter("mapping", clsRFunctionParameter:=clsHistAesFunction) If Not ucrSaveHist.bUserTyped Then ucrSaveHist.SetPrefix("density") End If @@ -260,9 +291,75 @@ Public Class dlgHistogram End If End If autoTranslate(Me) + UpdateParameter() + End Sub + + Private Sub UpdateParameter() + Dim strChangedTextFreq As String = ucrInputAddReorder.GetText() + clsRaesFunction.RemoveParameterByName("colour") + clsRaesFunction.RemoveParameterByName("y") + clsRaesFunction.RemoveParameterByName("fill") + + clsForecatsInfreqValue.AddParameter("f", "as.factor(" & ucrFactorReceiver.GetVariableNames(False) & ")", iPosition:=0) + + If rdoHistogram.Checked Then + Select Case strChangedTextFreq + Case strAscending + clsForecatsReverse.AddParameter("f", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + clsRaesFunction.AddParameter("fill", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strDescending + clsRaesFunction.AddParameter("fill", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + Case strReverse + clsForecatsReverse.AddParameter("f", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + clsRaesFunction.AddParameter("fill", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strNone + clsRaesFunction.AddParameter("fill", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + End Select + ElseIf rdoDensity_ridges.Checked Then + If ucrChkRidges.Checked Then + Select Case strChangedTextFreq + Case strAscending + clsForecatsReverse.AddParameter("f", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strDescending + clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + Case strReverse + clsForecatsReverse.AddParameter("f", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strNone + clsRaesFunction.AddParameter("y", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + End Select + Else + Select Case strChangedTextFreq + Case strAscending + clsForecatsReverse.AddParameter("f", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strDescending + clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + Case strReverse + clsForecatsReverse.AddParameter("f", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strNone + clsRaesFunction.AddParameter("colour", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + End Select + End If + Else + Select Case strChangedTextFreq + Case strAscending + clsForecatsReverse.AddParameter("f", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strDescending + clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + Case strReverse + clsForecatsReverse.AddParameter("f", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strNone + clsRaesFunction.AddParameter("colour", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + End Select + End If End Sub - Private Sub ucrPnlOptions_Control() Handles ucrPnlOptions.ControlValueChanged, ucrChkDisplayAsDotPlot.ControlValueChanged, ucrChkRidges.ControlValueChanged, ucrFactorReceiver.ControlValueChanged, ucrVariablesAsFactorforHist.ControlValueChanged + Private Sub ucrPnlOptions_Control() Handles ucrPnlOptions.ControlValueChanged, ucrChkDisplayAsDotPlot.ControlValueChanged, ucrChkRidges.ControlValueChanged, ucrFactorReceiver.ControlValueChanged, ucrVariablesAsFactorforHist.ControlValueChanged, ucrInputAddReorder.ControlValueChanged toolStripMenuItemHistogramOptions.Enabled = rdoHistogram.Checked AndAlso Not ucrChkDisplayAsDotPlot.Checked toolStripMenuItemDotOptions.Enabled = rdoHistogram.Checked AndAlso ucrChkDisplayAsDotPlot.Checked toolStripMenuItemDensityOptions.Enabled = rdoDensity_ridges.Checked AndAlso Not ucrChkRidges.Checked @@ -270,6 +367,7 @@ Public Class dlgHistogram toolStripMenuItemFrequencyPolygonOptions.Enabled = rdoFrequencyPolygon.Checked SetDialogOptions() DialogueSize() + UpdateParameter() End Sub Private Sub Adding_Percentages(ucrChangedControl As ucrCore) Handles ucrInputStats.ControlValueChanged, ucrChkPercentages.ControlValueChanged @@ -366,20 +464,26 @@ Public Class dlgHistogram Private Sub DialogueSize() If rdoHistogram.Checked Then Me.Size = New Size(464, 409) - Me.ucrSaveHist.Location = New Point(10, 284) - Me.ucrBase.Location = New Point(10, 314) + Me.lblReorder.Location = New Point(283, 275) + Me.ucrInputAddReorder.Location = New Point(283, 289) + Me.ucrSaveHist.Location = New Point(10, 314) + Me.ucrBase.Location = New Point(10, 342) ElseIf rdoDensity_ridges.Checked Then - Me.Size = New Size(464, 433) - Me.ucrSaveHist.Location = New Point(10, 311) - Me.ucrBase.Location = New Point(10, 334) + Me.Size = New Size(464, 461) + Me.lblReorder.Location = New Point(286, 298) + Me.ucrInputAddReorder.Location = New Point(287, 314) + Me.ucrSaveHist.Location = New Point(10, 342) + Me.ucrBase.Location = New Point(10, 365) Else Me.Size = New Size(464, 401) - Me.ucrSaveHist.Location = New Point(10, 275) - Me.ucrBase.Location = New Point(10, 305) + Me.lblReorder.Location = New Point(283, 250) + Me.ucrInputAddReorder.Location = New Point(283, 264) + Me.ucrSaveHist.Location = New Point(10, 288) + Me.ucrBase.Location = New Point(10, 314) End If End Sub - Private Sub CoreControls_ControlContentsChanged() Handles ucrVariablesAsFactorforHist.ControlContentsChanged, ucrSaveHist.ControlContentsChanged, ucrFactorReceiver.ControlContentsChanged, ucrChkRidges.ControlContentsChanged + Private Sub CoreControls_ControlContentsChanged() Handles ucrVariablesAsFactorforHist.ControlContentsChanged, ucrSaveHist.ControlContentsChanged, ucrFactorReceiver.ControlContentsChanged, ucrChkRidges.ControlContentsChanged, ucrInputAddReorder.ControlContentsChanged TestOkEnabled() End Sub End Class \ No newline at end of file From 7281548d0a9f9fb930a6eca5571d644392089ae3 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Thu, 21 Sep 2023 18:34:44 +0300 Subject: [PATCH 2/3] a change to the code --- instat/dlgHistogram.vb | 70 +++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/instat/dlgHistogram.vb b/instat/dlgHistogram.vb index 0cebbb3384c..ab3e283affc 100644 --- a/instat/dlgHistogram.vb +++ b/instat/dlgHistogram.vb @@ -303,33 +303,52 @@ Public Class dlgHistogram clsForecatsInfreqValue.AddParameter("f", "as.factor(" & ucrFactorReceiver.GetVariableNames(False) & ")", iPosition:=0) If rdoHistogram.Checked Then - Select Case strChangedTextFreq - Case strAscending - clsForecatsReverse.AddParameter("f", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) - clsRaesFunction.AddParameter("fill", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) - Case strDescending - clsRaesFunction.AddParameter("fill", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) - Case strReverse - clsForecatsReverse.AddParameter("f", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) - clsRaesFunction.AddParameter("fill", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) - Case strNone - clsRaesFunction.AddParameter("fill", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) - End Select - ElseIf rdoDensity_ridges.Checked Then - If ucrChkRidges.Checked Then + If Not ucrFactorReceiver.IsEmpty Then Select Case strChangedTextFreq Case strAscending clsForecatsReverse.AddParameter("f", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) - clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + clsRaesFunction.AddParameter("fill", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) Case strDescending - clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + clsRaesFunction.AddParameter("fill", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) Case strReverse clsForecatsReverse.AddParameter("f", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) - clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + clsRaesFunction.AddParameter("fill", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) Case strNone - clsRaesFunction.AddParameter("y", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + clsRaesFunction.AddParameter("fill", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) End Select - Else + End If + ElseIf rdoDensity_ridges.Checked Then + If Not ucrFactorReceiver.IsEmpty Then + If ucrChkRidges.Checked Then + Select Case strChangedTextFreq + Case strAscending + clsForecatsReverse.AddParameter("f", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strDescending + clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + Case strReverse + clsForecatsReverse.AddParameter("f", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + clsRaesFunction.AddParameter("y", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strNone + clsRaesFunction.AddParameter("y", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + End Select + Else + Select Case strChangedTextFreq + Case strAscending + clsForecatsReverse.AddParameter("f", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strDescending + clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) + Case strReverse + clsForecatsReverse.AddParameter("f", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) + Case strNone + clsRaesFunction.AddParameter("colour", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) + End Select + End If + End If + Else + If Not ucrFactorReceiver.IsEmpty Then Select Case strChangedTextFreq Case strAscending clsForecatsReverse.AddParameter("f", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) @@ -343,19 +362,6 @@ Public Class dlgHistogram clsRaesFunction.AddParameter("colour", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) End Select End If - Else - Select Case strChangedTextFreq - Case strAscending - clsForecatsReverse.AddParameter("f", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) - clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) - Case strDescending - clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) - Case strReverse - clsForecatsReverse.AddParameter("f", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) - clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) - Case strNone - clsRaesFunction.AddParameter("colour", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) - End Select End If End Sub From 80009b889a3205fb23d10016f06e1310f4258f76 Mon Sep 17 00:00:00 2001 From: Barbra2020 Date: Fri, 22 Sep 2023 13:06:39 +0300 Subject: [PATCH 3/3] changes to the code --- instat/dlgHistogram.vb | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/instat/dlgHistogram.vb b/instat/dlgHistogram.vb index ab3e283affc..26c424d6094 100644 --- a/instat/dlgHistogram.vb +++ b/instat/dlgHistogram.vb @@ -317,9 +317,9 @@ Public Class dlgHistogram clsRaesFunction.AddParameter("fill", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) End Select End If - ElseIf rdoDensity_ridges.Checked Then + Else If Not ucrFactorReceiver.IsEmpty Then - If ucrChkRidges.Checked Then + If rdoDensity_ridges.Checked AndAlso ucrChkRidges.Checked Then Select Case strChangedTextFreq Case strAscending clsForecatsReverse.AddParameter("f", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) @@ -347,21 +347,6 @@ Public Class dlgHistogram End Select End If End If - Else - If Not ucrFactorReceiver.IsEmpty Then - Select Case strChangedTextFreq - Case strAscending - clsForecatsReverse.AddParameter("f", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) - clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) - Case strDescending - clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsInfreqValue, iPosition:=0) - Case strReverse - clsForecatsReverse.AddParameter("f", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) - clsRaesFunction.AddParameter("colour", clsRFunctionParameter:=clsForecatsReverse, iPosition:=0) - Case strNone - clsRaesFunction.AddParameter("colour", ucrFactorReceiver.GetVariableNames(False), iPosition:=0) - End Select - End If End If End Sub