Pie Graphs
Author |
Message |
TomYoung
|
Posted: Tue Apr 05, 2011 5:24 pm Post subject: Pie Graphs |
|
|
Hey, So I am currently new to turing and I want to create a pie graph! Basicly I just need the background lines of to create a pie graph.
Well, too further, what I'm trying to do is that if let's say I ask the user.
How many drinks have you drank today:
Coca Cola : 2
Sprite : 1
Root Beer : 3
Now I would fill my pie graph with that data, but as you have read my problem is that I don't know how to start it up...? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Raknarg
![](http://compsci.ca/v3/uploads/user_avatars/3745510004d8be6689b92f.jpg)
|
Posted: Tue Apr 05, 2011 6:03 pm Post subject: RE:Pie Graphs |
|
|
So... do you know any syntax? Becuase I could help, but I don't want to waste my time if you don't know anything yet...
If the answer is no, I would learn the language a bit first (there's a pretty thorough tutorial on this site).
If the answer is yes, then do you have any code yet? |
|
|
|
|
![](images/spacer.gif) |
Raknarg
![](http://compsci.ca/v3/uploads/user_avatars/3745510004d8be6689b92f.jpg)
|
Posted: Tue Apr 05, 2011 6:05 pm Post subject: RE:Pie Graphs |
|
|
Basically it would require knowledge of loops, drawing and a bit of trigonometry. |
|
|
|
|
![](images/spacer.gif) |
Zren
![](http://compsci.ca/v3/uploads/user_avatars/1110053965512db6185954b.png)
|
Posted: Tue Apr 05, 2011 6:09 pm Post subject: RE:Pie Graphs |
|
|
No trig is required actually if you use the built in modules.
Look up Draw.FillArc in the help files. |
|
|
|
|
![](images/spacer.gif) |
Raknarg
![](http://compsci.ca/v3/uploads/user_avatars/3745510004d8be6689b92f.jpg)
|
Posted: Tue Apr 05, 2011 6:12 pm Post subject: RE:Pie Graphs |
|
|
:O
Damn, why didn't I think of that??
oh yeah, cause I needed rotation
Well, actually, listen to Zren, it's probs much simpler his way. |
|
|
|
|
![](images/spacer.gif) |
TomYoung
|
Posted: Tue Apr 05, 2011 6:14 pm Post subject: Re: RE:Pie Graphs |
|
|
Zren @ Tue Apr 05, 2011 6:09 pm wrote: No trig is required actually if you use the built in modules.
Look up Draw.FillArc in the help files.
Thank you. I will definitely look at it.
Edit: WOW Thank you! Totally helped me alot.
Edit2: Sorry for so many questions, but I will also need to input my data into a bar graph, is it just with the Draw.Box function, and the Draw.FillBox? |
|
|
|
|
![](images/spacer.gif) |
RandomLetters
|
Posted: Tue Apr 05, 2011 8:32 pm Post subject: RE:Pie Graphs |
|
|
Yes. |
|
|
|
|
![](images/spacer.gif) |
|
|