GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 01-May-2006, 20:44
Willis Willis is offline
New Member
 
Join Date: May 2006
Posts: 2
Willis is on a distinguished road

MFC Graphing


I need to figure out how to create a PIE chart in OnDraw(CDC* pDC).

Each graph will be a set of 5 sectors, (A->F) .. each sector's percentage will be the percentage of the sectors base value compared to the total.

Lemmi translate:

IF:
A = 0
B = 5
C = 5
D = 10
F = 10
...
Total = 30

A Percent = 0%
B Percent = 16.66%
C Percent = 16.66%
D Percent = 33.33%
F Percent = 33.33%

So the graph set would be...

Sector A Begins at 0° ends at 0°
Sector B Begins at 0° ends at 60°
Sector C Begins at 60° ends at 120°
Sector D Begins at 120° ends at 240°
Sector F Begins at 240° ends at 360 (or zero)°

... The base ellipse / circle is:
pDC->Ellipse(25,150,225,350);

How can I turn this into what I need?
  #2  
Old 01-May-2006, 23:07
Willis Willis is offline
New Member
 
Join Date: May 2006
Posts: 2
Willis is on a distinguished road

Re: MFC Graphing


Ok.. I understand Pie() better, but still don't get something..
for specific..


pDC->Pie(border,begin,end);

begin and end points.. I still don't get how to locate the apropiate points based off of the starting (or previous ending) points and the angle of rotation.
 
 

Recent GIDBlogToyota - 2008 July Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 22:11.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.