Skip to content

Commit

Permalink
Merge pull request #9335 from MeSophie/ImproveBarChatIssue9315
Browse files Browse the repository at this point in the history
Improved Plot Options Items in Bar Chart Dialog
  • Loading branch information
N-thony authored Jan 9, 2025
2 parents c242676 + 941c285 commit 8706b3f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions instat/dlgBarAndPieChart.vb
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ Public Class dlgBarAndPieChart

clsBaseOperator.SetAssignTo("last_graph", strTempDataframe:=ucrBarChartSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph")
ucrBase.clsRsyntax.SetBaseROperator(clsBaseOperator)
EnableDisablesOptions()
End Sub

Private Sub SetRCodeForControls(bReset As Boolean)
Expand Down Expand Up @@ -816,6 +817,15 @@ Public Class dlgBarAndPieChart
openSdgLayerOptions(clsGeomTextFunction, clsTextAesFunction)
End Sub

Private Sub EnableDisablesOptions()
toolStripMenuItemBarchartOptions.Enabled = rdoFrequency.Checked OrElse rdoValue.Checked
toolStripMenuItemTextOptions.Enabled = ucrChkAddLabelsText.Checked AndAlso (rdoValue.Checked OrElse rdoFrequency.Checked)
toolStripMenuItemTreemapTextOptionsOptions.Enabled = ucrChkAddLabelsTreemap.Checked AndAlso rdoTreeMap.Checked
toolStripMenuItemWordcloudOptions.Enabled = rdoWordCloud.Checked AndAlso rdoWordCloud.Checked
toolStripMenuItemTreemapOptions.Enabled = rdoTreeMap.Checked
toolStripMenuItemLollipopOptions.Enabled = ucrChkLollipop.Checked AndAlso rdoValue.Checked
End Sub

Private Sub SetDialogOptions()
If rdoValue.Checked Or rdoFrequency.Checked Then
clsRggplotFunction.AddParameter("mapping", clsRFunctionParameter:=clsBarAesFunction, iPosition:=1)
Expand Down Expand Up @@ -1264,6 +1274,7 @@ Public Class dlgBarAndPieChart
ucrInputAddReorder.ControlValueChanged, ucrInputReorderValue.ControlValueChanged, ucrNudMaxSize.ControlValueChanged,
ucrChkIncreaseSize.ControlValueChanged, ucrChkLollipop.ControlValueChanged
SetDialogOptions()
EnableDisablesOptions()
ChangeParameterName()
If rdoTreeMap.Checked Then
ucrReceiverArea.SetMeAsReceiver()
Expand Down Expand Up @@ -1390,6 +1401,7 @@ Public Class dlgBarAndPieChart
End Sub

Private Sub ucrChkAddLabelsTreemap_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAddLabelsTreemap.ControlValueChanged
EnableDisablesOptions()
If ucrChkAddLabelsTreemap.Checked Then
clsBaseOperator.AddParameter("geom_treemap_text", clsRFunctionParameter:=clsGeomTreemapTextFunction, iPosition:=3)
Else
Expand Down

0 comments on commit 8706b3f

Please sign in to comment.