B4A Library [B4X] [XUI] Pie Chart

SS-2017-11-06_15.14.32.png
SS-2017-11-06_15.15.05.png
SS-2017-11-06_15.15.26.png


A simple, cross platform, pie chart class based on XUI library.

Implemented as a custom view. Add it with the designer and set the data with:
B4X:
Dim data As List
data.Initialize
data.Add(PieChart1.CreateSlice("Slice #1", 234, 0)) '0 = random color
data.Add(PieChart1.CreateSlice("Slice #2", 500, xui.Color_Red))
data.Add(PieChart1.CreateSlice("Slice #3", 20, 0))
data.Add(PieChart1.CreateSlice("Slice #4", 200, 0))
PieChart1.SetData(data)

A B4J project is attached. The class is inside.
 

Attachments

  • PieChart.zip
    9 KB · Views: 737
Last edited:

tufanv

Expert
Licensed User
Longtime User
I am using jcharts for line chart , when I add this module to my b4j project , dim p as piechart use jcharts instead of xui. How can i fix this . ( jcharts also has a piechart , both of them are recıgnized as piechart.
 
Top