B4A Library [B4X] [XUI] Pie Chart

Erel

Administrator
Staff member
Licensed User


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

Last edited:

Erel

Administrator
Staff member
Licensed User
V1.01 uploaded. Fixes an issue when there is a single item.
 

tufanv

Expert
Licensed 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