B4A Library AndroidCharts - Pie Chart & Bar Chart & Line Chart

Johan Schoeman

Expert
Licensed User
Longtime User
Try with the attached lib files

Request is from here


B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("main")
    iv1.Initialize("")
    pv1.Initialize("pv1")
   
    Activity.AddView(pv1, 51%x, 5%y, 49%x, 90%y)
    Activity.AddView(iv1, 0%x, 5%y, 49%x, 90%y)
   
    Dim piedata() As Float = Array As Float(10, 15, 20, 25, 15, 10, 5)
    pv1.Data = piedata
   
    Dim piecolors() As Int = Array As Int(Colors.Green, Colors.Blue, Colors.Magenta, Colors.Yellow, Colors.DarkGray, Colors.Cyan, Colors.Red)
    pv1.PieColors = piecolors

    pv1.SeperatorLineColor = Colors.transparent
    pv1.SeperatorLineWidth = 0.0
   
    pv1.PieTextColor = Colors.Black
   
    pv1.ShowPercentLabel = True
   
End Sub
 

Attachments

  • AndroidCharts.jar
    39.7 KB · Views: 376
  • AndroidCharts.xml
    31.8 KB · Views: 371
Cookies are required to use this site. You must accept them to continue using the site. Learn more…