Sub Process_Globals
Private xui As XUI
End Sub
Sub Globals
Private xChart1 As xChart
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
InitChart
End Sub
Private Sub InitChart
Private x As Int
'Add two lines to the chart
xChart1.AddLine("Voltage", xui.Color_Blue)
xChart1.AddLine("Current", xui.Color_Red)
'Add values to the lines
'x Mod 10 = 0 means: display the x value only all 10 values
'x Mod 10 = 0 is True only for 0, 10, 20, 30 etc.
For x = 0 To 100
xChart1.AddLineMultiplePoints(x, Array As Double(Rnd(0, 50), Rnd(0, 10)), x Mod 10 = 0)
Next
'Draw the chart
xChart1.DrawChart
End Sub