Skip to content

Commit

Permalink
Revert "changes to the code"
Browse files Browse the repository at this point in the history
This reverts commit cba11a6.
  • Loading branch information
Vitalis95 committed Jun 3, 2024
1 parent cba11a6 commit 2619129
Showing 1 changed file with 6 additions and 26 deletions.
32 changes: 6 additions & 26 deletions instat/dlgBoxPlot.vb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Public Class dlgBoxplot
ucrPnlPlots.AddFunctionNamesCondition(rdoBoxplotTufte, {"geom_boxplot", "geom_tufteboxplot"})
ucrPnlPlots.AddFunctionNamesCondition(rdoJitter, "geom_jitter")
ucrPnlPlots.AddFunctionNamesCondition(rdoViolin, "geom_violin")
ucrPnlPlots.AddToLinkedControls({ucrChkAddPoints}, {rdoBoxplotTufte, rdoViolin}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlPlots.AddToLinkedControls({ucrChkAddPoints, ucrChkWidth}, {rdoBoxplotTufte, rdoViolin}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlPlots.AddToLinkedControls({ucrChkTufte}, {rdoBoxplotTufte}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrChkTufte.AddToLinkedControls(ucrChkVarWidth, {"FALSE"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlPlots.AddToLinkedControls(ucrChkBoxPlot, {rdoJitter, rdoViolin}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
Expand Down Expand Up @@ -235,7 +235,7 @@ Public Class dlgBoxplot
ucrInputStation.SetItems({strFacetWrap, strFacetRow, strFacetCol, strNone})
ucrInputStation.SetDropDownStyleAsNonEditable()

ucrChkWidth.SetText("Cut Width")
ucrChkWidth.SetText("Width")
ucrChkWidth.AddToLinkedControls({ucrInputWidth}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.25)
ucrChkWidth.AddParameterValuesCondition(True, "cut_width", "True")
ucrChkWidth.AddParameterValuesCondition(False, "cut_width", "False")
Expand All @@ -260,7 +260,6 @@ Public Class dlgBoxplot
ucrChkGrouptoConnect.AddParameterPresentCondition(False, strStatSummaryParameterName, False)
'this control exists but diabled for now
DialogueSize()
HideShowWidth()
End Sub

Private Sub SetDefaults()
Expand Down Expand Up @@ -439,7 +438,6 @@ Public Class dlgBoxplot
ucrChkBoxPlot.SetRCode(clsDummyFunction, bReset)
ucrChkWidth.SetRCode(clsDummyFunction, bReset)
End If
HideShowWidth()
End Sub

Private Sub TestOkEnabled()
Expand Down Expand Up @@ -490,8 +488,6 @@ Public Class dlgBoxplot
SetGeomPrefixFillColourAes()
DialogueSize()
EnableDisableBoxplotOptions()
HideShowWidth()

If rdoBoxplotTufte.Checked Then
If ucrChkAddPoints.Checked Then
clsBoxplotFunction.AddParameter("outlier.shape", "NA", iPosition:=2)
Expand Down Expand Up @@ -736,7 +732,6 @@ Public Class dlgBoxplot
AddRemoveGroupBy()
EnableDisableWidth()
AddRemoveAesParm()
HideShowWidth()
End Sub

Private Sub GetParameterValue(clsOperator As ROperator)
Expand Down Expand Up @@ -810,20 +805,22 @@ Public Class dlgBoxplot
clsCutWitdhFunction.RemoveParameterByName("var")
End If
EnableDisableWidth()
HideShowWidth()
End Sub

Private Sub ucrChkWidth_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkWidth.ControlValueChanged
EnableDisableWidth()
HideShowWidth()
End Sub

Private Sub EnableDisableWidth()
If ucrByFactorsReceiver.strCurrDataType = "Date" OrElse ucrByFactorsReceiver.strCurrDataType = "factor" OrElse ucrByFactorsReceiver.strCurrDataType = "orderded, factor" Then
ucrChkWidth.Enabled = False
ucrInputWidth.Enabled = False
clsBoxplotFunction.RemoveParameterByName("aes")
clsWidthRaesFunction.RemoveParameterByName("group")
clsViolinplotFunction.RemoveParameterByName("aes")
Else
ucrChkWidth.Enabled = True
ucrInputWidth.Enabled = True
If ucrChkWidth.Checked AndAlso Not ucrByFactorsReceiver.IsEmpty Then
clsWidthRaesFunction.AddParameter("group", clsRFunctionParameter:=clsCutWitdhFunction, iPosition:=1)
clsBoxplotFunction.AddParameter("aes", clsRFunctionParameter:=clsWidthRaesFunction, bIncludeArgumentName:=False, iPosition:=1)
Expand All @@ -836,23 +833,6 @@ Public Class dlgBoxplot
End If
End Sub

Private Sub HideShowWidth()
ucrChkWidth.Visible = False
ucrInputWidth.Visible = False
If rdoBoxplotTufte.Checked OrElse rdoViolin.Checked Then
If ucrByFactorsReceiver.strCurrDataType = "numeric" Then
ucrChkWidth.Visible = True
ucrInputWidth.Visible = ucrChkWidth.Checked
Else
ucrChkWidth.Visible = False
ucrInputWidth.Visible = False
End If
Else
ucrChkWidth.Visible = False
ucrInputWidth.Visible = False
End If
End Sub

Private Sub ucrChkBoxPlot_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkBoxPlot.ControlValueChanged, ucrNudBoxPlot.ControlValueChanged
If ucrChkBoxPlot.Checked Then
clsGeomBoxPlotFunction.AddParameter("width", ucrNudBoxPlot.GetText(), iPosition:=3)
Expand Down

0 comments on commit 2619129

Please sign in to comment.