Quick Search for:  in language:    
Class,draws,Graphs
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
ASP/ VbScript Stats

 Code: 203,988. lines
 Jobs: 109. postings

 How to support the site

 
Sponsored by:

 
You are in:
 
Login


 

 


Latest Code Ticker for ASP/ VbScript
Click here to see a screenshot of this code!Rapid Classified v2.0
By Gurgen Alaverdian on 1/17

(Screen Shot)

Click here to see a screenshot of this code!Gallery Image with Zoom
By Marcelo Valle Franco on 1/12

(Screen Shot)

Click here to see a screenshot of this code!ASP Photo Competition
By Saul Bryan on 1/12

(Screen Shot)

Execute DTS package
By Himadrish Laha on 1/12


Connecting to a MySQL with ADO, DAO and RDO
By Ahmed Magdy Ezzeldin on 1/11


Automatic Form Insertion To Database
By Yasar Bayar on 1/11


Click here to see a screenshot of this code!Find Closest Physical Location (based on zip code, etc)
By Mark Kahn on 1/11

(Screen Shot)

String --> SQL Search Query
By Mark Kahn on 1/11


Replace text/Numbers for Images...
By Kenneth Nilsson on 1/9


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!

Affiliate Sites



 
 
   

DrawPieGraph

Print
Email
 
winzip icon
Submitted on: 9/23/2002 6:07:14 AM
By: mark baekdal 
Level: Advanced
User Rating: By 13 Users
Compatibility:ASP (Active Server Pages)

Users have accessed this code 4031 times.
 
(About the author)
 
     Class that draws Pie Graphs.

 
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!

    '**************************************
    ' for :DrawPieGraph
    '**************************************
    no copy right as I learnt and used alot of the code from an example by Paul Walchli which I have ammended To make a generic example. Will also be doing the same things to the bar chart and line chart example he has sent.
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
9/25/2002 2:50:54 AM:Jeroen Elias
Excellent code! <br>
This code uses 
Microsoft Vector Graphics 
Rendering(VML), which requires 
that 
at least one of the following products 
must be instaled: <br>
- Access 2000 
<br>
- Excel 2000 <br>
- FrontPage 
2000 <br>
- Office 2000 Premium 
<br>
- Outlook 2000 <br>
- PowerPoint 
2000 <br>
- Word 2000 
<br>
<br>
Besides that, an image 
named '1pixel.gif' is missing in the 
post. <br>
Also, it would be nice if 
you could provide an example web page 
using this Pie Graph (I'll post one).
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/25/2002 2:51:50 AM:Jeroen Elias
Here's a sample ASP page: 
<br>
<pre>
<!-- #include 
file="drawpiegraph.asp" -->
<%
Dim oGraph
  Set oGraph = New 
DrawPieGraph
  With oGraph
.Diameter = 50
    .Shadow = True
.Title = "<font face='Arial' 
size=3><b>This is the 
title</b></font>"
    .ShowLegend = 
True
    .LegendSize = 8
.ShowValues = True
    .FontDef = 
"<font face='Arial' size=2>"
.HTMLouterTableDef = "<table border=2 
cellpadding=1 cellspacing=0>"
.HTMLinnerTableDef = "<table border=1 
cellspacing=0 cellpadding=3>"
 .AddValue 100, "label1", "red"
.AddValue 200, "label2", "green"
.AddValue 30, "label3", "blue"
.AddValue 50, "label4", "yellow"
.AddValue 5, "label5", "gray"
 .Draw
  End With
  Set oGraph = 
Nothing
%>
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/26/2002 9:25:36 AM:
"This code uses 
Microsoft Vector 
Graphics 
Rendering(VML), which 
requires 
that 
at least one of the 
following products 
must be instaled: 
- Access 2000 etc..."
NOT True - VML 
is an inbuilt behaviour of IEv5+. (... 
you may be thinking of Office Web 
Componants OWC, which does require one 
of the office apps installed)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/4/2002 5:44:49 PM:
love it!  Very Helpful!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/4/2002 7:01:45 PM:Jon Spartan
I can't seem to get the sample to work. 
Another 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/4/2002 7:04:55 PM:Jon Spartan
I tired the "test page" and couldnt get 
it to run. It would very helpful for us 
ASP beginners if something a bit more 
detailed in how to implement this 
"class" and how to get the variables to 
the class would be most helpful.
I 
am confused by the things like 
.AddValue. What comes before the perod 
there, and all the other places ? ANd 
do you just add the Include or do you 
ahve to do something else to get to the 
class ?
Sorry, but us beginners can 
be real dumb, and I am the first to 
admit it.
If anyone would add a more 
detailed sample on how to use this 
function it would be esteemd a 
favor.
Thank You.
Jon Spartan
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/7/2002 3:53:10 PM:
I can't seem to print the pie chart 
after I have generated it. has anyone 
else come across this issue, or have a 
fix?
Thanks
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/18/2002 3:13:29 AM:Jeroen Elias
Please go visit the following page to 
view the sample: 
http://www.ccengine.com/samples/asp/dr
awpiegraph/sample.html 
To view the 
sample: go to 
http://www.ccengine.com/samples/asp/draw
piegraph/sample.asp
Good luck!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/24/2002 1:14:53 PM:Andrew Mathiason
When I run it all the pieces of the pie 
pile up on top each other instead of 
fall into place in the pie.  
When I 
look at the example Jeroen Elias last a 
link for, it too has the pieces piled 
up on top of each other.  
Is this a 
browser difference? I am using IE 5.0
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
10/24/2002 2:28:54 PM:Andrew Mathiason
It works on IE 6
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/28/2002 8:09:09 AM:
well.. it's a nice code mark but, why 
it cannot view in Internet Explorer 
version 5 and 5.5 ?? 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/28/2002 9:26:05 PM:
sorry.. I already know that IE version 
5 and 5.5 did not support XML, But does 
it work's that if I don't have one of 
Microsoft Office 2000 product 
instaled??
Please..help me, Urgent 
required...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/8/2003 4:16:51 AM:
When I run it all the pieces of the pie 
pile up on top each other instead of 
fall into place in the pie.  
When I 
look at the example Jeroen Elias last 
a 
link for, it too has the pieces 
piled 
up on top of each other.  
Is 
this a 
browser difference? I am using 
IE 5.0
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | ASP/ VbScript Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.