#Region Project Attributes
#ApplicationLabel: MPMultiBarChart
#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.
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 mlc1 As MultiBarChart
Private Button1 As Button
Dim flag As Int = 0
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")
mlc1.ChartDescription = "TITLE : Just some random data"
mlc1.ChartDescriptionColor = Colors.Red
mlc1.ChartDescriptionTextSize = 15
mlc1.GridBackgroundColor = Colors.DarkGray
' RIGHT_OF_CHART, RIGHT_OF_CHART_CENTER, RIGHT_OF_CHART_INSIDE,
' LEFT_OF_CHART, LEFT_OF_CHART_CENTER, LEFT_OF_CHART_INSIDE,
' BELOW_CHART_LEFT, BELOW_CHART_RIGHT, BELOW_CHART_CENTER,
' CIRCLE, SQUARE, LINE
mlc1.LegendShapeSize = 10.0
mlc1.setTheLegendPositionAndForm("BELOW_CHART_CENTER","CIRCLE")
mlc1.TheLegendColor = Colors.yellow
mlc1.TheLegendTextSize = 10.0
mlc1.LegendText = Array As String("2011", "2012", "2013", "2014", "2015")
mlc1.ValueTextColor = Array As Int(Colors.White, Colors.Red, Colors.White, Colors.Red, Colors.White)
mlc1.ValueTextSize = Array As Float(12.0, 10.0, 14.0, 8.0, 16.0)
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
' We are going to draw 2 charts/graphs
mlc1.Chart_1_Data = Array As Float(1100.0, 550.0, 550.0, -300.0, 600.5, 445.0, 849.7, -250.4, -380.2, 345.0, 453.5, 783.7)
mlc1.Chart_2_Data = Array As Float(1200.0, 750.0, 450.0, 960.0, 730.0, 1100.0, 676.5, 985.6, 1010.8, 836.4, 498.5, 965.3)
mlc1.DrawGraphValues = Array As Boolean(True, True, False, True, False)
' Maximum 5 colors to be passed ==> must be at least equal to the number of data sets that are passed i.e maximum 5
' If you pass only for eg 2 data sets then at least 2 colors need to be passed
' If more that 2 colors are passed with for eg only 2 data sets then only the first 2 colors will be used in the color array
mlc1.LineColors = Array As Int(Colors.Yellow, Colors.Red, Colors.Blue, Colors.Green, Colors.Cyan)
mlc1.GraphLineWidth = Array As Float(2.0, 3.0, 4.0, 5.0, 6.0)
mlc1.XaxisTextColor = Colors.Cyan
mlc1.XaxisTextSize = 12.0
mlc1.XaxisLables = Array As String("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
' TOP, BOTTOM, BOTH_SIDED, TOP_INSIDE, BOTTOM_INSIDE
mlc1.XaxisLabelPosition = "BOTTOM"
mlc1.YaxisMinVal = -600 'commented it out so that the scale will be set automatically
mlc1.YaxisMaxVal = 1600 'commented it out so that the scale will be set automatically
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
mlc1.ShowYaxisRightLabels = False
mlc1.CubicIntensity = Array As Float(0.1, 0.2, 0.3, 0.4, 0.5)
mlc1.DrawCubicGraph = Array As Boolean(True, False, True, False, True)
mlc1.DrawDashedLine = Array As Boolean(True, False, True, False, True)
mlc1.MarkerToUse = 4
mlc1.XAnimate = True
mlc1.YAnimate = False
mlc1.XYAnimate = False
mlc1.ChartAnimationTime = 2000 'milliseconds
' the number of charts to be drawn (maximum 5, in this case 2)
' the number of x-axis values per chart (in this case 12 = number of elements in the array passed to mlc1.XaxisLables)
mlc1.setBarData(2,12)
flag = flag + 1
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
If flag = 8 Then
flag = 1
End If
If flag = 1 Then
mlc1 = Null
draw_graph_2
else If flag = 2 Then
mlc1 = Null
draw_graph_3
else if flag = 3 Then
mlc1 = Null
draw_graph_4
else if flag = 4 Then
mlc1 = Null
draw_graph_5
else if flag = 5 Then
mlc1 = Null
draw_graph_6
else if flag = 6 Then
mlc1 = Null
draw_graph_7
else if flag = 7 Then
mlc1 = Null
draw_graph_8
End If
End Sub
Sub draw_graph_2
mlc1.ChartDescription = "Graph of Sine(x)"
mlc1.ChartDescriptionColor = Colors.Red
mlc1.ChartDescriptionTextSize = 15
mlc1.GridBackgroundColor = Colors.DarkGray
' RIGHT_OF_CHART, RIGHT_OF_CHART_CENTER, RIGHT_OF_CHART_INSIDE,
' LEFT_OF_CHART, LEFT_OF_CHART_CENTER, LEFT_OF_CHART_INSIDE,
' BELOW_CHART_LEFT, BELOW_CHART_RIGHT, BELOW_CHART_CENTER,
' CIRCLE, SQUARE, LINE
mlc1.LegendShapeSize = 10.0
mlc1.setTheLegendPositionAndForm("BELOW_CHART_CENTER","CIRCLE")
mlc1.TheLegendColor = Colors.yellow
mlc1.TheLegendTextSize = 10.0
mlc1.LegendText = Array As String("Sine(x)")
mlc1.ValueTextColor = Array As Int(Colors.White)
mlc1.ValueTextSize = Array As Float(12.0)
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
' We are going to draw 1 charts/graphs
Dim cnt As Int = 0
Dim cd1(73), cd2(73), cd3(73), cd4(73), cd5(73)As Float
Dim xal(73) As String
For i = 0 To 360 Step 5
cd1(cnt) = SinD(i)
xal(cnt) = i
cnt = cnt + 1
Next
mlc1.Chart_1_Data = cd1
mlc1.XaxisLables = xal
mlc1.DrawGraphValues = Array As Boolean(False)
' Maximum 5 colors to be passed ==> must be at least equal to the number of data sets that are passed i.e maximum 5
' If you pass only for eg 2 data sets then at least 2 colors need to be passed
' If more that 2 colors are passed with for eg only 2 data sets then only the first 2 colors will be used in the color array
mlc1.LineColors = Array As Int(Colors.Cyan)
mlc1.GraphLineWidth = Array As Float(2.0)
mlc1.XaxisTextColor = Colors.Cyan
mlc1.XaxisTextSize = 12.0
' TOP, BOTTOM, BOTH_SIDED, TOP_INSIDE, BOTTOM_INSIDE
mlc1.XaxisLabelPosition = "BOTTOM"
mlc1.YaxisMinVal = -1.1 'commented it out so that the scale will be set automatically
mlc1.YaxisMaxVal = 1.1 'commented it out so that the scale will be set automatically
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
mlc1.ShowYaxisRightLabels = False
mlc1.DrawDashedLine = Array As Boolean(False)
mlc1.MarkerToUse = 3
mlc1.XAnimate = False
mlc1.YAnimate = True
mlc1.XYAnimate = False
mlc1.ChartAnimationTime = 2000 'milliseconds
' the number of charts to be drawn (maximum 5, in this case 1)
' the number of x-axis values per chart (in this case 12 = number of elements in the array passed to mlc1.XaxisLables)
mlc1.setBarData(1,73)
flag = flag + 1
End Sub
Sub draw_graph_3
mlc1.ChartDescription = "Graph of Cosine(x)"
mlc1.ChartDescriptionColor = Colors.Red
mlc1.ChartDescriptionTextSize = 15
mlc1.GridBackgroundColor = Colors.DarkGray
' RIGHT_OF_CHART, RIGHT_OF_CHART_CENTER, RIGHT_OF_CHART_INSIDE,
' LEFT_OF_CHART, LEFT_OF_CHART_CENTER, LEFT_OF_CHART_INSIDE,
' BELOW_CHART_LEFT, BELOW_CHART_RIGHT, BELOW_CHART_CENTER,
' CIRCLE, SQUARE, LINE
mlc1.LegendShapeSize = 10.0
mlc1.setTheLegendPositionAndForm("BELOW_CHART_CENTER","CIRCLE")
mlc1.TheLegendColor = Colors.yellow
mlc1.TheLegendTextSize = 10.0
mlc1.LegendText = Array As String("Cosine(x)")
mlc1.ValueTextColor = Array As Int(Colors.White)
mlc1.ValueTextSize = Array As Float(12.0)
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
' We are going to draw 1 charts/graphs
Dim cnt As Int = 0
Dim cd1(73), cd2(73), cd3(73), cd4(73), cd5(73)As Float
Dim xal(73) As String
For i = 0 To 360 Step 5
cd1(cnt) = CosD(i)
xal(cnt) = i
cnt = cnt + 1
Next
mlc1.Chart_1_Data = cd1
mlc1.XaxisLables = xal
mlc1.DrawGraphValues = Array As Boolean(False)
' Maximum 5 colors to be passed ==> must be at least equal to the number of data sets that are passed i.e maximum 5
' If you pass only for eg 2 data sets then at least 2 colors need to be passed
' If more that 2 colors are passed with for eg only 2 data sets then only the first 2 colors will be used in the color array
mlc1.LineColors = Array As Int(Colors.Cyan)
mlc1.GraphLineWidth = Array As Float(2.0)
' mlc1.DrawFilled = Array As Boolean(False)
mlc1.XaxisTextColor = Colors.Cyan
mlc1.XaxisTextSize = 12.0
' TOP, BOTTOM, BOTH_SIDED, TOP_INSIDE, BOTTOM_INSIDE
mlc1.XaxisLabelPosition = "BOTTOM"
mlc1.YaxisMinVal = -1.1 'commented it out so that the scale will be set automatically
mlc1.YaxisMaxVal = 1.1 'commented it out so that the scale will be set automatically
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
mlc1.ShowYaxisRightLabels = False
mlc1.DrawDashedLine = Array As Boolean(True)
mlc1.MarkerToUse = 2
mlc1.XAnimate = False
mlc1.YAnimate = False
mlc1.XYAnimate = True
mlc1.ChartAnimationTime = 2000 'milliseconds
' the number of charts to be drawn (maximum 5, in this case 1)
' the number of x-axis values per chart (in this case 12 = number of elements in the array passed to mlc1.XaxisLables)
mlc1.setBarData(1,73)
flag = flag + 1
End Sub
Sub draw_graph_4
mlc1.ChartDescription = "Graph of Sine(x + y)"
mlc1.ChartDescriptionColor = Colors.Red
mlc1.ChartDescriptionTextSize = 15
mlc1.GridBackgroundColor = Colors.DarkGray
' RIGHT_OF_CHART, RIGHT_OF_CHART_CENTER, RIGHT_OF_CHART_INSIDE,
' LEFT_OF_CHART, LEFT_OF_CHART_CENTER, LEFT_OF_CHART_INSIDE,
' BELOW_CHART_LEFT, BELOW_CHART_RIGHT, BELOW_CHART_CENTER,
' CIRCLE, SQUARE, LINE
mlc1.LegendShapeSize = 10.0
mlc1.setTheLegendPositionAndForm("BELOW_CHART_CENTER","CIRCLE")
mlc1.TheLegendColor = Colors.yellow
mlc1.TheLegendTextSize = 10.0
mlc1.LegendText = Array As String("Sine(x + 0)", "Sine(x + 30)", "Sine(x + 60)", "Sine(x + 90)", "Sine(x + 120)")
mlc1.ValueTextColor = Array As Int(Colors.White, Colors.Green, Colors.Red, Colors.Magenta, Colors.Cyan)
mlc1.ValueTextSize = Array As Float(4.0, 5.0, 6.0, 7.0, 8.0)
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
' We are going to draw 5 charts/graphs
Dim cnt As Int = 0
Dim cd1(73), cd2(73), cd3(73), cd4(73), cd5(73)As Float
Dim xal(73) As String
For i = 0 To 360 Step 5
cd1(cnt) = SinD(i)
cd2(cnt) = SinD(i+30)
cd3(cnt) = SinD(i+60)
cd4(cnt) = SinD(i+90)
cd5(cnt) = SinD(i+120)
xal(cnt) = i
cnt = cnt + 1
Next
mlc1.Chart_1_Data = cd1
mlc1.Chart_2_Data = cd2
mlc1.Chart_3_Data = cd3
mlc1.Chart_4_Data = cd4
mlc1.Chart_5_Data = cd5
mlc1.XaxisLables = xal
mlc1.DrawGraphValues = Array As Boolean(False, False, False, False, False)
' Maximum 5 colors to be passed ==> must be at least equal to the number of data sets that are passed i.e maximum 5
' If you pass only for eg 2 data sets then at least 2 colors need to be passed
' If more that 2 colors are passed with for eg only 2 data sets then only the first 2 colors will be used in the color array
mlc1.LineColors = Array As Int(Colors.White, Colors.Green, Colors.Red, Colors.Magenta, Colors.Cyan)
mlc1.GraphLineWidth = Array As Float(2.0, 3.0, 4.0, 5.0, 6.0)
mlc1.XaxisTextColor = Colors.Cyan
mlc1.XaxisTextSize = 12.0
' TOP, BOTTOM, BOTH_SIDED, TOP_INSIDE, BOTTOM_INSIDE
mlc1.XaxisLabelPosition = "BOTTOM"
mlc1.YaxisMinVal = -1.1 'commented it out so that the scale will be set automatically
mlc1.YaxisMaxVal = 1.1 'commented it out so that the scale will be set automatically
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
mlc1.ShowYaxisRightLabels = False
mlc1.DrawDashedLine = Array As Boolean(True, False, True, False, True)
mlc1.MarkerToUse = 1
mlc1.XAnimate = True
mlc1.YAnimate = False
mlc1.XYAnimate = False
mlc1.ChartAnimationTime = 2000 'milliseconds
' the number of charts to be drawn (maximum 5, in this case 5)
' the number of x-axis values per chart (in this case 12 = number of elements in the array passed to mlc1.XaxisLables)
mlc1.setBarData(5,73)
flag = flag + 1
End Sub
Sub draw_graph_5
mlc1.ChartDescription = "Graph of Cosine(x+y)"
mlc1.ChartDescriptionColor = Colors.Red
mlc1.ChartDescriptionTextSize = 15
mlc1.GridBackgroundColor = Colors.DarkGray
' RIGHT_OF_CHART, RIGHT_OF_CHART_CENTER, RIGHT_OF_CHART_INSIDE,
' LEFT_OF_CHART, LEFT_OF_CHART_CENTER, LEFT_OF_CHART_INSIDE,
' BELOW_CHART_LEFT, BELOW_CHART_RIGHT, BELOW_CHART_CENTER,
' CIRCLE, SQUARE, LINE
mlc1.LegendShapeSize = 10.0
mlc1.setTheLegendPositionAndForm("BELOW_CHART_CENTER","CIRCLE")
mlc1.TheLegendColor = Colors.yellow
mlc1.TheLegendTextSize = 10.0
mlc1.LegendText = Array As String("Cosine(x + 0)", "Cosine(x + 36)", "Cosine(x + 72)", "Cosine(x + 108)", "Cosine(x + 144)")
mlc1.ValueTextColor = Array As Int(Colors.White, Colors.Green, Colors.Red, Colors.Magenta, Colors.Cyan)
mlc1.ValueTextSize = Array As Float(4.0, 5.0, 6.0, 7.0, 8.0)
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
' We are going to draw 5 charts/graphs
Dim cnt As Int = 0
Dim cd1(73), cd2(73), cd3(73), cd4(73), cd5(73)As Float
Dim xal(73) As String
For i = 0 To 360 Step 5
cd1(cnt) = CosD(i)
cd2(cnt) = CosD(i+36)
cd3(cnt) = CosD(i+72)
cd4(cnt) = CosD(i+108)
cd5(cnt) = CosD(i+144)
xal(cnt) = i
cnt = cnt + 1
Next
mlc1.Chart_1_Data = cd1
mlc1.Chart_2_Data = cd2
mlc1.Chart_3_Data = cd3
mlc1.Chart_4_Data = cd4
mlc1.Chart_5_Data = cd5
mlc1.XaxisLables = xal
mlc1.DrawGraphValues = Array As Boolean(False, False, False, False, False)
' Maximum 5 colors to be passed ==> must be at least equal to the number of data sets that are passed i.e maximum 5
' If you pass only for eg 2 data sets then at least 2 colors need to be passed
' If more that 2 colors are passed with for eg only 2 data sets then only the first 2 colors will be used in the color array
mlc1.LineColors = Array As Int(Colors.White, Colors.Green, Colors.Red, Colors.Magenta, Colors.Cyan)
mlc1.GraphLineWidth = Array As Float(2.0, 3.0, 4.0, 5.0, 6.0)
' mlc1.DrawFilled = Array As Boolean(False, False, False, False, False)
mlc1.XaxisTextColor = Colors.Cyan
mlc1.XaxisTextSize = 12.0
' TOP, BOTTOM, BOTH_SIDED, TOP_INSIDE, BOTTOM_INSIDE
mlc1.XaxisLabelPosition = "BOTTOM"
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
mlc1.ShowYaxisRightLabels = False
mlc1.DrawDashedLine = Array As Boolean(True, False, True, False, True)
mlc1.MarkerToUse = 4
mlc1.XAnimate = False
mlc1.YAnimate = False
mlc1.XYAnimate = True
mlc1.ChartAnimationTime = 2000 'milliseconds
' the number of charts to be drawn (maximum 5, in this case 5)
' the number of x-axis values per chart (in this case 12 = number of elements in the array passed to mlc1.XaxisLables)
mlc1.setBarData(5,73)
flag = flag + 1
End Sub
Sub draw_graph_6
mlc1.ChartDescription = "TITLE : Just some random data"
mlc1.ChartDescriptionColor = Colors.Red
mlc1.ChartDescriptionTextSize = 15
mlc1.GridBackgroundColor = Colors.DarkGray
' RIGHT_OF_CHART, RIGHT_OF_CHART_CENTER, RIGHT_OF_CHART_INSIDE,
' LEFT_OF_CHART, LEFT_OF_CHART_CENTER, LEFT_OF_CHART_INSIDE,
' BELOW_CHART_LEFT, BELOW_CHART_RIGHT, BELOW_CHART_CENTER,
' CIRCLE, SQUARE, LINE
mlc1.LegendShapeSize = 10.0
mlc1.setTheLegendPositionAndForm("BELOW_CHART_CENTER","CIRCLE")
mlc1.TheLegendColor = Colors.yellow
mlc1.TheLegendTextSize = 10.0
mlc1.LegendText = Array As String("2011", "2012", "2013", "2014", "2015")
mlc1.ValueTextColor = Array As Int(Colors.White, Colors.Red, Colors.White, Colors.Red, Colors.White)
mlc1.ValueTextSize = Array As Float(12.0, 10.0, 14.0, 8.0, 16.0)
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
' We are going to draw 3 charts/graphs
mlc1.Chart_1_Data = Array As Float(1100.0, 550.0, 550.0, -300.0, 600.5, 445.0, 849.7, -250.4, -380.2, 345.0, 453.5, 783.7)
mlc1.Chart_2_Data = Array As Float(1200.0, 750.0, 450.0, 960.0, 730.0, 1100.0, 676.5, 985.6, 1010.8, 836.4, 498.5, 965.3)
mlc1.Chart_3_Data = Array As Float(836.4, 1010.8, 985.6, 676.5, 1100.0, 730.0, 960.0, 450.0, 750.0, 1200, 1134.8, 736.1)
mlc1.DrawGraphValues = Array As Boolean(True, True, False, True, False)
' Maximum 5 colors to be passed ==> must be at least equal to the number of data sets that are passed i.e maximum 5
' If you pass only for eg 2 data sets then at least 2 colors need to be passed
' If more that 2 colors are passed with for eg only 2 data sets then only the first 2 colors will be used in the color array
mlc1.LineColors = Array As Int(Colors.Yellow, Colors.Red, Colors.Blue, Colors.Green, Colors.Cyan)
mlc1.GraphLineWidth = Array As Float(2.0, 3.0, 4.0, 5.0, 6.0)
mlc1.XaxisTextColor = Colors.Cyan
mlc1.XaxisTextSize = 12.0
mlc1.XaxisLables = Array As String("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
' TOP, BOTTOM, BOTH_SIDED, TOP_INSIDE, BOTTOM_INSIDE
mlc1.XaxisLabelPosition = "BOTTOM"
mlc1.YaxisMinVal = -600 'commented it out so that the scale will be set automatically
mlc1.YaxisMaxVal = 1600 'commented it out so that the scale will be set automatically
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
mlc1.ShowYaxisRightLabels = False
mlc1.CubicIntensity = Array As Float(0.1, 0.2, 0.3, 0.4, 0.5)
mlc1.DrawCubicGraph = Array As Boolean(True, False, True, False, True)
mlc1.DrawDashedLine = Array As Boolean(True, False, True, False, True)
mlc1.MarkerToUse = 3
mlc1.XAnimate = False
mlc1.YAnimate = True
mlc1.XYAnimate = False
mlc1.ChartAnimationTime = 2000 'milliseconds
' the number of charts to be drawn (maximum 5, in this case 3)
' the number of x-axis values per chart (in this case 12 = number of elements in the array passed to mlc1.XaxisLables)
mlc1.setBarData(3,12)
flag = flag + 1
End Sub
Sub draw_graph_7
mlc1.ChartDescription = "TITLE : Just some random data"
mlc1.ChartDescriptionColor = Colors.Red
mlc1.ChartDescriptionTextSize = 15
mlc1.GridBackgroundColor = Colors.DarkGray
' RIGHT_OF_CHART, RIGHT_OF_CHART_CENTER, RIGHT_OF_CHART_INSIDE,
' LEFT_OF_CHART, LEFT_OF_CHART_CENTER, LEFT_OF_CHART_INSIDE,
' BELOW_CHART_LEFT, BELOW_CHART_RIGHT, BELOW_CHART_CENTER,
' CIRCLE, SQUARE, LINE
mlc1.LegendShapeSize = 10.0
mlc1.setTheLegendPositionAndForm("BELOW_CHART_CENTER","CIRCLE")
mlc1.TheLegendColor = Colors.yellow
mlc1.TheLegendTextSize = 10.0
mlc1.LegendText = Array As String("2011", "2012", "2013", "2014", "2015")
mlc1.ValueTextColor = Array As Int(Colors.White, Colors.Red, Colors.White, Colors.Red, Colors.White)
mlc1.ValueTextSize = Array As Float(12.0, 10.0, 14.0, 8.0, 16.0)
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
' We are going to draw 4 charts/graphs
mlc1.Chart_1_Data = Array As Float(1100.0, 550.0, 550.0, -300.0, 600.5, 445.0, 849.7, -250.4, -380.2, 345.0, 453.5, 783.7)
mlc1.Chart_2_Data = Array As Float(1200.0, 750.0, 450.0, 960.0, 730.0, 1100.0, 676.5, 985.6, 1010.8, 836.4, 498.5, 965.3)
mlc1.Chart_3_Data = Array As Float(836.4, 1010.8, 985.6, 676.5, 1100.0, 730.0, 960.0, 450.0, 750.0, 1200, 1134.8, 736.1)
mlc1.Chart_4_Data = Array As Float(345.0, -380.2, -250.4, 849.7, 445.0, 600.5, -300.0, 50.0, 550.0, 1100.0, 894.2, 993.8)
mlc1.DrawGraphValues = Array As Boolean(True, True, False, True, False)
' Maximum 5 colors to be passed ==> must be at least equal to the number of data sets that are passed i.e maximum 5
' If you pass only for eg 2 data sets then at least 2 colors need to be passed
' If more that 2 colors are passed with for eg only 2 data sets then only the first 2 colors will be used in the color array
mlc1.LineColors = Array As Int(Colors.Yellow, Colors.Red, Colors.Blue, Colors.Green, Colors.Cyan)
mlc1.GraphLineWidth = Array As Float(2.0, 3.0, 4.0, 5.0, 6.0)
' mlc1.DrawFilled = Array As Boolean(False, False, False, False, False)
mlc1.XaxisTextColor = Colors.Cyan
mlc1.XaxisTextSize = 12.0
mlc1.XaxisLables = Array As String("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
' TOP, BOTTOM, BOTH_SIDED, TOP_INSIDE, BOTTOM_INSIDE
mlc1.XaxisLabelPosition = "BOTTOM"
mlc1.YaxisMinVal = -600 'commented it out so that the scale will be set automatically
mlc1.YaxisMaxVal = 1600 'commented it out so that the scale will be set automatically
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
mlc1.ShowYaxisRightLabels = False
mlc1.CubicIntensity = Array As Float(0.1, 0.2, 0.3, 0.4, 0.5)
mlc1.DrawCubicGraph = Array As Boolean(True, False, True, False, True)
mlc1.DrawDashedLine = Array As Boolean(True, False, True, False, True)
mlc1.MarkerToUse = 2
mlc1.XAnimate = False
mlc1.YAnimate = False
mlc1.XYAnimate = True
mlc1.ChartAnimationTime = 2000 'milliseconds
' the number of charts to be drawn (maximum 5, in this case 4)
' the number of x-axis values per chart (in this case 12 = number of elements in the array passed to mlc1.XaxisLables)
mlc1.setBarData(4,12)
flag = flag + 1
End Sub
Sub draw_graph_8
mlc1.ChartDescription = "TITLE : Just some random data"
mlc1.ChartDescriptionColor = Colors.Red
mlc1.ChartDescriptionTextSize = 15
mlc1.GridBackgroundColor = Colors.DarkGray
' RIGHT_OF_CHART, RIGHT_OF_CHART_CENTER, RIGHT_OF_CHART_INSIDE,
' LEFT_OF_CHART, LEFT_OF_CHART_CENTER, LEFT_OF_CHART_INSIDE,
' BELOW_CHART_LEFT, BELOW_CHART_RIGHT, BELOW_CHART_CENTER,
' CIRCLE, SQUARE, LINE
mlc1.LegendShapeSize = 10.0
mlc1.setTheLegendPositionAndForm("BELOW_CHART_CENTER","CIRCLE")
mlc1.TheLegendColor = Colors.yellow
mlc1.TheLegendTextSize = 10.0
mlc1.LegendText = Array As String("2011", "2012", "2013", "2014", "2015")
mlc1.ValueTextColor = Array As Int(Colors.White, Colors.Red, Colors.White, Colors.Red, Colors.White)
mlc1.ValueTextSize = Array As Float(12.0, 10.0, 14.0, 8.0, 16.0)
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
' We are going to draw 5 charts/graphs
mlc1.Chart_1_Data = Array As Float(1100.0, 550.0, 550.0, -300.0, 600.5, 445.0, 849.7, -250.4, -380.2, 345.0, 453.5, 783.7)
mlc1.Chart_2_Data = Array As Float(1200.0, 750.0, 450.0, 960.0, 730.0, 1100.0, 676.5, 985.6, 1010.8, 836.4, 498.5, 965.3)
mlc1.Chart_3_Data = Array As Float(836.4, 1010.8, 985.6, 676.5, 1100.0, 730.0, 960.0, 450.0, 750.0, 1200, 1134.8, 736.1)
mlc1.Chart_4_Data = Array As Float(345.0, -380.2, -250.4, 849.7, 445.0, 600.5, -300.0, 50.0, 550.0, 1100.0, 894.2, 993.8)
mlc1.Chart_5_Data = Array As Float(1050.0, 850.0, 650.0, 1400.0, 760.8, -450.7, 934.9, 576.2, 896.4, -380.6, 636.7, 1215.9)
mlc1.DrawGraphValues = Array As Boolean(True, True, False, True, False)
' Maximum 5 colors to be passed ==> must be at least equal to the number of data sets that are passed i.e maximum 5
' If you pass only for eg 2 data sets then at least 2 colors need to be passed
' If more that 2 colors are passed with for eg only 2 data sets then only the first 2 colors will be used in the color array
mlc1.LineColors = Array As Int(Colors.Yellow, Colors.Red, Colors.Blue, Colors.Green, Colors.Cyan)
mlc1.GraphLineWidth = Array As Float(2.0, 3.0, 4.0, 5.0, 6.0)
mlc1.XaxisTextColor = Colors.Cyan
mlc1.XaxisTextSize = 12.0
mlc1.XaxisLables = Array As String("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
' TOP, BOTTOM, BOTH_SIDED, TOP_INSIDE, BOTTOM_INSIDE
mlc1.XaxisLabelPosition = "BOTTOM"
mlc1.YaxisMinVal = -600 'commented it out so that the scale will be set automatically
mlc1.YaxisMaxVal = 1600 'commented it out so that the scale will be set automatically
mlc1.YaxisTextSize = 10.0
mlc1.YaxisTextColor = Colors.White
mlc1.ShowYaxisRightLabels = False
mlc1.CubicIntensity = Array As Float(0.1, 0.2, 0.3, 0.4, 0.5)
mlc1.DrawCubicGraph = Array As Boolean(True, False, True, False, True)
mlc1.DrawDashedLine = Array As Boolean(True, False, True, False, True)
mlc1.MarkerToUse = 1
mlc1.XAnimate = False
mlc1.YAnimate = True
mlc1.XYAnimate = False
mlc1.ChartAnimationTime = 2000 'milliseconds
' the number of charts to be drawn (maximum 5, in this case 5)
' the number of x-axis values per chart (in this case 12 = number of elements in the array passed to mlc1.XaxisLables)
mlc1.setBarData(5,12)
flag = flag + 1
End Sub