Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Pie Graphs

Author
Message
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 15th Feb 2009 18:33 Edited at: 26th Nov 2009 23:51
It draws Pie Graphs (o rly?)

Enter the data as showing in lines 16-38, call Pie_GetPieImage, and there you go.



One small problem that could use fixing: At the end of the Pie_GetPieImage function, the for c-next c loop prints the text onto the different parts of the graph. I'm pretty sure this can be done with SIN() and COS() but for the life of me I couldn't get them to line up with the graph. I resorted to finding the average X and Y positions of all the dots in that segment of the pie. I bet the function could be sped up a lot of someone could get that to work with SIN and COS.

Alduce
21
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 15th Feb 2009 20:23
Greetings for the code! works fine and very useful!

Login to post a reply

Server time is: 2024-05-02 04:52:07
Your offset time is: 2024-05-02 04:52:07