Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help regarding pie graph

 
Aayush Patel
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone help me..i want to make pie graph...like graph in which will be disribute circle according to values
 
Greg Harris
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i wrote a similar program in c++ last year... it was supposed to display a regular clock with an hour hand and a minute hand. i will have to send the code when i get home tonight, but here is the idea:
first draw the circle and then draw a line from the center point to a point on the circumference of the circle. i cannot remember the exact formula at the moment, but it has something to do with the (pi * radius ^2) formula.
if you do not have an answer by the time i get home then i will send you that part of my code.
 
Stephanie Grasson
Ranch Hand
Posts: 347
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aayush,
You could try something like this:

Hope this helps.
Stephanie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic