Android Question Pie Chart & Bar Chart & Line Chart library

AlpVir

Well-Known Member
Licensed User
Longtime User
I used the library "AndroidCharts - Pie Chart & Bar Chart & Line Chart" by Johan Schoeman's.
Https://www.b4x.com/android/forum/threads/androidcharts-pie-chart-bar-chart-line-chart.57760/

B4X:
Activity.LoadLayout("main")
    pv1.Initialize("pv1")
    Activity.Color=Colors.White
    Activity.AddView(pv1, 2dip,100%y-20dip,18dip,18dip)
    Dim piedata() As Float = Array As Float(10, 15, 75)
    pv1.Data = piedata
    Dim piecolors() As Int = Array As Int(Colors.Green, Colors.red, Colors.Green)
    pv1.PieColors = piecolors
    pv1.ShowPercentLabel = False

All OK but .... how do you eliminate the white line that separates the various sectors ?
Thanks for the attention.
 

Johan Schoeman

Expert
Licensed User
Longtime User
I have missed this posting like some others when they are not posted in the library thread. Go here
https://www.b4x.com/android/forum/t...bar-chart-line-chart.57760/page-2#post-528309

B4A code:
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
 
Upvote 0
Top