PieChart1.ClearData
Private i, Values(4) As Int
For i = 0 To 3
Values(i) = Rnd(50, 501)
Next
PieChart1.AddPie("Slice #1", Values(0), xui.Color_Blue) '0 = random color
PieChart1.AddPie("Slice #2", Values(1), xui.Color_Red)
PieChart1.AddPie("Slice #3", Values(2), xui.Color_Yellow)
PieChart1.AddPie("Slice #4", Values(3), xui.Color_Cyan)
PieChart1.DrawChart