# How to calculate the percentage in a pie chart using vb.net

Number not in pie slices
For i As Integer = 1 To values.Length
col = (100 + 10 * Math.Cos(angles(i)))
If angles(i) > pi / 2 And angles(i) < 3 * pi / 2 Then col = col - 6
row = (100 - 100 * Math.Sin(angles(i)))
If angles(i) >= pi Then row = row - 100
gr.DrawString(values(i - 1), Me.Font, Brushes.Black, (col + 200) / 2, (row + 300) / 2)
Next
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
It looks as if you have already computed the angles for each pie wedge, so if you need to figure out the percentage, it should just be the angle/2pi,

percentage = angles(i)/(2*pi)*100
0

Experts Exchange Solution brought to you by