Skip to content

Commit

Permalink
Merge pull request #21 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
fetching latest copy of master
  • Loading branch information
maxwellfundi committed Feb 18, 2016
2 parents 8aa4d18 + 86ab441 commit 2920966
Show file tree
Hide file tree
Showing 19 changed files with 1,193 additions and 186 deletions.
76 changes: 38 additions & 38 deletions instat/dlgBarAndPieChart.Designer.vb

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

33 changes: 30 additions & 3 deletions instat/dlgBarAndPieChart.vb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ Imports instat.Translations
Public Class dlgBarAndPieChart
Private clsRggplotFunction As New RFunction
Private clsRgeom_barchart As New RFunction
Private clsRgeom_Piechart As New RFunction
Private clsRgeom_piechart As New RFunction
Private clsRgeom_piechartCoord As New RFunction
Private clsRaesFunction As New RFunction
Private Sub dlgBarAndPieChart_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ucrBase.clsRsyntax.SetOperation("+")
Expand All @@ -41,16 +42,42 @@ Public Class dlgBarAndPieChart
clsRggplotFunction.AddParameter("data", clsRFunctionParameter:=ucrBarChartSelector.ucrAvailableDataFrames.clsCurrDataFrame)
End Sub
Private Sub ucrFactorReceiver_Leave(sender As Object, e As EventArgs) Handles ucrFactorReceiver.Leave
clsRaesFunction.AddParameter("x", ucrFactorReceiver.GetVariableNames(False))
If rdoBarChart.Checked = True Then
clsRaesFunction.AddParameter("x", ucrFactorReceiver.GetVariableNames(False))
Else
clsRaesFunction.AddParameter("fill", ucrFactorReceiver.GetVariableNames(False))

End If
End Sub
Private Sub ucrSecondReceiver_Leave(sender As Object, e As EventArgs) Handles ucrSecondReceiver.Leave
clsRaesFunction.AddParameter("fill", ucrSecondReceiver.GetVariableNames(False))
If rdoBarChart.Checked = True Then
clsRaesFunction.AddParameter("fill", ucrSecondReceiver.GetVariableNames(False))
Else
clsRaesFunction.AddParameter("x", Chr(34) & Chr(34))
End If
End Sub

Private Sub grpSelection_CheckedChanged(sender As Object, e As EventArgs) Handles rdoBarChart.CheckedChanged, rdoPieChart.CheckedChanged
If rdoBarChart.Checked = True Then
clsRgeom_barchart.SetRCommand("geom_bar")
ucrBase.clsRsyntax.SetOperatorParameter(False, clsRFunc:=clsRgeom_barchart)

ElseIf rdoPieChart.Checked = True Then

Dim clsTempOp As New ROperator
Dim clsTempRFunc As New RFunction
clsTempOp.SetOperation("+")

clsRgeom_piechart.SetRCommand("geom_bar")
ucrBase.clsRsyntax.SetOperatorParameter(False, clsRFunc:=clsRgeom_piechart)
clsRgeom_piechart.AddParameter("width", "1")

clsTempOp.SetParameter(True, clsRFunc:=clsRggplotFunction)
clsTempOp.SetParameter(False, clsRFunc:=clsRgeom_piechart)
clsTempRFunc.SetRCommand("coord_polar")
clsTempRFunc.AddParameter("theta", Chr(34) & "y" & Chr(34))
ucrBase.clsRsyntax.SetOperatorParameter(True, clsOp:=clsTempOp)
ucrBase.clsRsyntax.SetOperatorParameter(False, clsRFunc:=clsTempRFunc)
Else
ucrBase.clsRsyntax.SetOperatorParameter(False, clsRFunc:=Nothing)
End If
Expand Down
2 changes: 1 addition & 1 deletion instat/dlgBoxplotMethod.vb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Imports instat.Translations
Public Class dlgBoxplotMethod
Private Sub ucrBase_Load(sender As Object, e As EventArgs) Handles ucrBase.Load
autoTranslate(Me)
ucrBase.clsRsyntax.SetFunction("climate_obj$boxplot")
ucrBase.clsRsyntax.SetFunction(frmMain.clsRLink.strClimateObject & "$boxplot_method")
ucrBase.clsRsyntax.iCallType = 0
End Sub

Expand Down
Loading

0 comments on commit 2920966

Please sign in to comment.