How to use this page.

Sample Code

Pie Chart Builder The Marvelous and Stupendous Pie Chart

Pass values to the page as query string parameters.
The values will be evaluated to generate a pie chart graphic.

Not passing any recognized pie piece query string values produces this text page.

Recognized Parameters

Parameter Shortcut Description Data Type Default Value
title t The title of the chart. string empty string
name[nn] n[nn] The name of a pie shape. string empty string
color[nn] c[nn] The color to draw a pie shape. string empty color
value[nn] v[nn] The value of a pie shape. decimal 0.0
width w The pixel width of the graphic. integer 150
legend l Determines if the legend will be drawn. boolean true
titlefont tf The name of the font to use for the chart title. string Verdana
titlefontsize tfs The point size of the font to use for the chart title. integer 12
titlefontcolor tfc The color of the font to use for the chart title. string Dark Blue
legendfont lf The name of the font to use for the legend. string Verdana
legendfontsize lfs The point size of the font to use for the legend. integer 8
legendfontcolor lfc The color of the font to use for the legend. string Black
legendbordercolor lbc The color of the line defining the legend rectangle. string Black
legendborderwidth lbw The width of the line defining the legend rectangle. integer 2
legendvalues lv Determines if the legend will include values. boolean true
legendtotal lt Determines if the total of all values will be drawn in the legend. boolean true
legenddate ld Determines if the current date will be drawn in the legend. boolean true
legenddatetime ldt Determines if the current date and time will be drawn in the legend. boolean true
legendfooterfont lff The name of the font to use for the legend footer. string Verdana
legendfooterfontsize lffs The point size of the font to use for the legend footer. integer 8
legendfooterfontcolor lffc The color of the font to use for the legend footer. string Dark Blue
legendonly lo Determines if Only the legend should be displayed. boolean False

Samples for Testing

Click on the following links to see some sample charts.

Name Description
Preview URL

Sample 1 A very simple chart. A Title and three pie pieces are defined.
The Marvelous and Stupendous Pie Chart piechart.aspx?title=Sample 1&name1=Apples&name2= Oranges&name3=Bananas&color1=red&color2=orange&color3=yellow&value1=4&value2=6&value3=2

Auto Ratings Sample Same as above, different parameter values.
The Marvelous and Stupendous Pie Chart piechart.aspx?title=Auto Ratings&name1=Mustang&name2=Explorer&name3=Mazda MX6&color1=red&color2=blue&color3=brown&value1=14&value2=36&value3=22

Browser Preferences Sample Some things to notice
- width=200
- 4th item is added at end of list.
- 4th item is not consistently numbered. (name44, color52, value99)
- Each 'name' parameter must be numbered uniquely.
- name, color and value parameters are not matched by number, but by instance order.
- color2 is listed before name2. The order of the color, value and name is not critical.
The Marvelous and Stupendous Pie Chart piechart.aspx?legenddatetime=0&title=Browser Preferences&width=200&name1=Mozilla Firefox&color1=aqua&color2=indianred&color3=goldenrod&value1=194&name2=Internet Explorer&name3=Opera&value2=362&value3=122&name44=Safari&color52=chocolate&value99=99

Programming Languages Sample
The Marvelous and Stupendous Pie Chart piechart.aspx?titlefontsize=14&legendtotal=0&titlefontcolor=red&title=Programming Languages&width=300&name1=JSharp&color1=red&color2=blue&name2=Basic&name3=Visual Basic&color3=goldenrod&value1=1942&value2=3622&value3=3122&name4444=C Sharp&color52=chocolate&value99=4599&value100=1011&color100=green&name100=HTML




Below is another demonstrated use of this page.


Calls Answered by Call Center


HOW TO:

Display the pie chart as an image on your page.

<img alt='image name here' src='http://vegadiscoveries.com/resources/chartgraph/piechart.aspx?title=Sample 1&name1=Apples&name2= Oranges&name3=Bananas&color1=red&color2=orange&color3=yellow&value1=4&value2=6&value3=2' /> 


 
Created By: Richard Hancock - Vega Discoveries - All rights reserved - Copyright 2009