Skip to content

Commit

Permalink
Merge pull request IDEMSInternational#8642 from MeSophie/GeneralGraph…
Browse files Browse the repository at this point in the history
…ics8640

Fixed Small Issue On General Graphics Dialog
  • Loading branch information
N-thony authored Nov 17, 2023
2 parents f487dd6 + 5c7bb25 commit 591c559
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 93 deletions.
38 changes: 26 additions & 12 deletions instat/dlgGeneralForGraphics.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions instat/dlgGeneralForGraphics.vb
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,12 @@ Public Class dlgGeneralForGraphics
End Sub

Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click
sdgPlots.DisableLayersTab()
sdgPlots.SetRCode(clsNewOperator:=ucrBase.clsRsyntax.clsBaseOperator, clsNewThemeFunction:=clsThemeFunction, dctNewThemeFunctions:=dctThemeFunctions, clsNewYScalecontinuousFunction:=clsYScalecontinuousFunction,
clsNewXScalecontinuousFunction:=clsXScalecontinuousFunction, clsNewLabsFunction:=clsLabsFunction, clsNewXLabsTitleFunction:=clsXlabsFunction, clsNewYLabTitleFunction:=clsYlabsFunction,
clsNewFacetFunction:=clsFacetsFunction, clsNewScaleFillViridisFunction:=clsScaleFillViridisFunction, clsNewScaleColourViridisFunction:=clsScaleColourViridisFunction, clsNewGlobalAesFunction:=clsGlobalAesFunction,
clsNewXScaleDateFunction:=clsXScaleDateFunction, clsNewYScaleDateFunction:=clsYScaleDateFunction, ucrNewBaseSelector:=sdgLayerOptions.ucrGeomWithAes.ucrGeomWithAesSelector, clsNewAnnotateFunction:=clsAnnotateFunction,
clsNewCoordPolarFunction:=clsCoordPolarFunction, clsNewCoordPolarStartOperator:=clsCoordPolarStartOperator, bReset:=bResetSubdialog)
sdgPlots.ShowDialog()
sdgPlots.EnableLayersTab()
bResetSubdialog = False
End Sub

Expand Down Expand Up @@ -328,6 +326,18 @@ Public Class dlgGeneralForGraphics
sdgPlots.EnableLayersTab()
End Sub

Private Sub cmdColour_Click(sender As Object, e As EventArgs) Handles cmdColour.Click
sdgPlots.DisableLayersTab()
sdgPlots.SetRCode(clsNewOperator:=ucrBase.clsRsyntax.clsBaseOperator, clsNewThemeFunction:=clsThemeFunction, dctNewThemeFunctions:=dctThemeFunctions, clsNewYScalecontinuousFunction:=clsYScalecontinuousFunction,
clsNewXScalecontinuousFunction:=clsXScalecontinuousFunction, clsNewLabsFunction:=clsLabsFunction, clsNewXLabsTitleFunction:=clsXlabsFunction, clsNewYLabTitleFunction:=clsYlabsFunction,
clsNewFacetFunction:=clsFacetsFunction, clsNewScaleFillViridisFunction:=clsScaleFillViridisFunction, clsNewScaleColourViridisFunction:=clsScaleColourViridisFunction, clsNewGlobalAesFunction:=clsGlobalAesFunction,
clsNewXScaleDateFunction:=clsXScaleDateFunction, clsNewYScaleDateFunction:=clsYScaleDateFunction, ucrNewBaseSelector:=sdgLayerOptions.ucrGeomWithAes.ucrGeomWithAesSelector, clsNewAnnotateFunction:=clsAnnotateFunction,
clsNewCoordPolarFunction:=clsCoordPolarFunction, clsNewCoordPolarStartOperator:=clsCoordPolarStartOperator, bReset:=bResetOptionsSubdialog)
sdgPlots.tbpPlotsOptions.SelectedIndex = 7
sdgPlots.ShowDialog()
bResetOptionsSubdialog = False
sdgPlots.EnableLayersTab()
End Sub
Private Sub ucrReceiverY_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverY.ControlValueChanged, ucrReceiverX.ControlValueChanged
If Not ucrReceiverY.IsEmpty Then
clsGlobalAesFunction.AddParameter("y", ucrReceiverY.GetVariableNames(False), iPosition:=1)
Expand Down
44 changes: 23 additions & 21 deletions instat/sdgPlots.vb
Original file line number Diff line number Diff line change
Expand Up @@ -694,26 +694,11 @@ Public Class sdgPlots
dctThemeFunctions.TryGetValue("axis.text.x", clsXElementText)
dctThemeFunctions.TryGetValue("axis.title.x", clsXElementTitle)
dctThemeFunctions.TryGetValue("axis.text.y", clsYElemetText)
dctThemeFunctions.TryGetValue("title", clsPlotElementTitleFunction)
dctThemeFunctions.TryGetValue("sub.title", clsPlotElementSubTitleFunction)
dctThemeFunctions.TryGetValue("caption", clsPlotElementCaptionFunction)
dctThemeFunctions.TryGetValue("tag", clsPlotElementTagFunction)
dctThemeFunctions.TryGetValue("colour", clsPlotLegendTitleFunction)

dctNewThemeFunctions.TryGetValue("axis.title.y", clsYElemetTitle)

If dctThemeFunctions.TryGetValue("caption", clsPlotElementCaptionFunction) Then
clsThemeFunction.AddParameter("plot.caption", clsRFunctionParameter:=clsPlotElementCaptionFunction)
End If

If dctThemeFunctions.TryGetValue("title", clsPlotElementTitleFunction) Then
clsThemeFunction.AddParameter("plot.title", clsRFunctionParameter:=clsPlotElementTitleFunction)
End If

If dctThemeFunctions.TryGetValue("sub.title", clsPlotElementSubTitleFunction) Then
clsThemeFunction.AddParameter("plot.subtitle", clsRFunctionParameter:=clsPlotElementSubTitleFunction)
End If

If clsFacetFunction.ContainsParameter("facets") Then
clsTempParam = clsFacetFunction.GetParameter("facets")
If clsTempParam.bIsOperator AndAlso clsTempParam.clsArgumentCodeStructure IsNot Nothing Then
Expand Down Expand Up @@ -757,9 +742,11 @@ Public Class sdgPlots
ucrChkMargin.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True)
ucrChkFreeSpace.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True)
ucrChkFreeScalesX.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True)
ucrChkFreeScalesY.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True)
If bReset Then
ucrChkFreeScalesY.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True)
End If
ucrNudNumberofRows.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True)
ucrChkLabeler.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True)
ucrChkLabeler.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True)
ucrChkDrop.SetRCode(clsFacetFunction, bReset, bCloneIfNeeded:=True)
ucrChkIncludeFacets.SetRCode(clsBaseOperator, bReset, bCloneIfNeeded:=True)

Expand Down Expand Up @@ -1208,8 +1195,8 @@ Public Class sdgPlots
ucrChkYaxisSize.SetRCode(clsYElemetTitle, bReset, bCloneIfNeeded:=True)
ucrNudYSize.SetRCode(clsYElemetTitle, bReset, bCloneIfNeeded:=True)

ucrNudXaxisMarkSize.SetRCode(clsXElementText, bReset, bCloneIfNeeded:=True)
ucrChkXaxisTickMarkLabelSize.SetRCode(clsXElementText, bReset, bCloneIfNeeded:=True)
ucrNudXaxisMarkSize.SetRCode(clsXElementText, bReset, bCloneIfNeeded:=True)
End Sub

Private Sub cmdSimpleOptions_Click(sender As Object, e As EventArgs) Handles cmdSimpleOptions.Click
Expand Down Expand Up @@ -1331,15 +1318,30 @@ Public Class sdgPlots
End Sub

Private Sub ucrNudCaptionSize_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudCaptionSize.ControlValueChanged
clsPlotElementCaptionFunction.AddParameter("size", ucrNudCaptionSize.GetText)
If clsPlotElementCaptionFunction.clsParameters.Count > 0 Then
clsThemeFunction.AddParameter("plot.caption", clsRFunctionParameter:=clsPlotElementCaptionFunction)
Else
clsThemeFunction.RemoveParameterByName("plot.caption")
End If
AddRemoveTheme()
End Sub

Private Sub ucrNudTitleSize_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudTitleSize.ControlValueChanged
clsPlotElementTitleFunction.AddParameter("size", ucrNudTitleSize.GetText)
If clsPlotElementTitleFunction.clsParameters.Count > 0 Then
clsThemeFunction.AddParameter("plot.title", clsRFunctionParameter:=clsPlotElementTitleFunction)
Else
clsThemeFunction.RemoveParameterByName("plot.title")
End If
AddRemoveTheme()
End Sub

Private Sub ucrNudSubTitleSize_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudSubTitleSize.ControlValueChanged
clsPlotElementSubTitleFunction.AddParameter("size", ucrNudSubTitleSize.GetText)
If clsPlotElementSubTitleFunction.clsParameters.Count > 0 Then
clsThemeFunction.AddParameter("plot.title", clsRFunctionParameter:=clsPlotElementSubTitleFunction)
Else
clsThemeFunction.RemoveParameterByName("plot.title")
End If
AddRemoveTheme()
End Sub

Private Sub ucrNudTagSize_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudTagSize.ControlValueChanged
Expand Down
Loading

0 comments on commit 591c559

Please sign in to comment.