#Region Project Attributes
#ApplicationLabel: AndroidPlot_MultiLineChart
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: landscape
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim t As Timer
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private lc1 As LineChart
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
t.Initialize("t", 10000)
lc1.GraphPinchZoomable = True 'see note in this methods help about implimentation of this functionality
lc1.GraphBackgroundColor = Colors.DarkGray
lc1.GraphFrameColor = Colors.Blue
lc1.GraphFrameWidth = 4.0
lc1.GraphPlotAreaBackgroundColor = Colors.ARGB(50, 0, 0, 255)
lc1.GraphTitleTextSize = 15
lc1.GraphTitleColor = Colors.White
lc1.GraphTitleSkewX = -0.25
lc1.GraphTitleUnderline = True
lc1.GraphTitleBold = True
lc1.GraphTitle = "MONTHLY RAINFALL FOR SOME PLACE IN THE WORLD - 2010 TO 2014" 'put this statement last
lc1.LegendBackgroundColor = Colors.White 'it will be converted to an Alpha = 100
lc1.LegendTextColor = Colors.Black
lc1.LegendTextSize = 15.0
lc1.DomianLabel = "MONTH OF THE YEAR"
lc1.DomainLabelColor = Colors.White
lc1.DomainLabelTextSize = 18.0
lc1.XaxisGridLineColor = Colors.ARGB(100,255,255,255)
lc1.XaxisGridLineWidth = 2.0
lc1.XaxisLabelTicks = 1
lc1.XaxisLabelOrientation = 0
lc1.XaxisLabelTextColor = Colors.White
lc1.XaxisLabelTextSize = 15.0
lc1.XAxisLabels = Array As String("Jan","Feb", "Mar","Apr", "May","Jun","Jul", "Aug","Sep","Oct") ', "Nov","Dec")
lc1.YaxisDivisions = 8
lc1.YaxisShowZero = False
lc1.YaxisRange(-1000, 10000) 'enable this line if you want to set the y-axis minimum and maximum values - else it will be scaled automatically
lc1.YaxisValueFormat = lc1.ValueFormat_0 'could be ValueFormat_0, ValueFormat_1, ValueFormat_2, or ValueFormat_3
lc1.YaxisGridLineColor = Colors.Black
lc1.YaxisGridLineWidth = 2
lc1.YaxisLabelTicks = 1
lc1.YaxisLabelColor = Colors.Yellow
lc1.YaxisLabelOrientation = -30
lc1.YaxisLabelTextSize = 12
lc1.YaxisTitleColor = Colors.Green
lc1.YaxisTitleFakeBold = False
lc1.YaxisTitleTextSize = 20.0
lc1.YaxisTitleUnderline = True
lc1.YaxisTitleTextSkewness = 0
lc1.YaxisLabelAndTitleDistance = 60.0
lc1.YaxisTitle = "mm of rainfall recorded" 'put this statement last
lc1.MaxNumberOfEntriesPerLineChart = 10 'this value must be equal to the number of x-axis labels that you pass
lc1.Line_1_LegendText = "2010"
lc1.Line_1_Data = Array As Float (3000.0, 1000.0, 1700.0, 2000.0, 1800.0, 2500.0, 2700.0, 2800.0, 3100.0, 1600.0)
lc1.Line_1_PointLabelTextColor = Colors.Yellow
lc1.Line_1_PointLabelTextSize = 10.0
lc1.Line_1_LineColor = Colors.LightGray
lc1.Line_1_LineWidth = 2.0
lc1.Line_1_PointColor = Colors.Red
lc1.Line_1_PointSize = 10.0
lc1.Line_1_PointShape = lc1.SHAPE_ROUND
lc1.Line_1_DrawDash = True
lc1.Line_1_DrawCubic = True
lc1.Line_2_LegendText = "2011"
lc1.Line_2_Data = Array As Float (2200.0, 2700.0, 2900.0, 2800.0, 2600.0, 3000.0, 3300.0, 3400.0, 3900.0, 1400.0)
lc1.Line_2_PointLabelTextColor = Colors.Black
lc1.Line_2_PointLabelTextSize = 10.0
lc1.Line_2_LineColor = Colors.Green
lc1.Line_2_LineWidth = 5.0
lc1.Line_2_PointColor = Colors.Cyan
lc1.Line_2_PointSize = 10.0
lc1.Line_2_PointShape = lc1.SHAPE_SQUARE
lc1.Line_2_DrawDash = True
lc1.Line_2_DrawCubic = False
lc1.Line_3_LegendText = "2012"
lc1.Line_3_Data = Array As Float (3200.0, 3700.0, 3900.0, 3800.0, 3600.0, 4000.0, 4300.0, 4400.0, 4900.0, 400.0)
lc1.Line_3_PointLabelTextColor = Colors.Green
lc1.Line_3_PointLabelTextSize = 10.0
lc1.Line_3_LineColor = Colors.White
lc1.Line_3_LineWidth = 3.0
lc1.Line_3_PointColor = Colors.Green
lc1.Line_3_PointSize = 10.0
lc1.Line_3_PointShape = lc1.SHAPE_BUTT
lc1.Line_3_DrawDash = False
lc1.Line_3_DrawCubic = True
lc1.Line_4_LegendText = "2013"
lc1.Line_4_Data = Array As Float (5000.0, 5300.0, 5400.0, 5900.0, 1600.0, 4200.0, 4700.0, 4900.0, 4800.0, 4600.0)
lc1.Line_4_PointLabelTextColor = Colors.LightGray
lc1.Line_4_PointLabelTextSize = 10.0
lc1.Line_4_LineColor = Colors.Red
lc1.Line_4_LineWidth = 7.0
lc1.Line_4_PointColor = Colors.Black
lc1.Line_4_PointSize = 10.0
lc1.Line_4_PointShape = lc1.SHAPE_ROUND
lc1.Line_4_DrawDash = False
lc1.Line_4_DrawCubic = False
lc1.Line_5_LegendText = "2014"
lc1.Line_5_Data = Array As Float (7700.0, 7900.0, 7800.0, 7600.0, 8000.0, 8300.0, 8400.0, 8900.0, 7400.0, 6200.0)
lc1.Line_5_PointLabelTextColor = Colors.White 'make the point label text to appear "invisible"
lc1.Line_5_PointLabelTextSize = 10.0
lc1.Line_5_LineColor = 0xFFFF1493
lc1.Line_5_LineWidth = 5.0
lc1.Line_5_PointColor = Colors.White 'make the point to appear "invisible"
lc1.Line_5_PointSize = 10.0
lc1.Line_5_PointShape = lc1.SHAPE_SQUARE
lc1.Line_5_DrawDash = True
lc1.Line_5_DrawCubic = True
lc1.NumberOfLineCharts = 5 'set the number of graphs to draw from the 1 to 5 graph that has been set up above
lc1.DrawTheGraphs
End Sub
Sub Activity_Resume
t.Enabled = True
End Sub
Sub Activity_Pause (UserClosed As Boolean)
t.Enabled = False
End Sub
Sub t_tick
lc1.GraphReset
End Sub