How to use this page.

Sample Code

Bar Graph Builder The Marvelous and Stupendous Bar Graph

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

Not passing any recognized bar 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 bar. string empty string
value[nn] v[nn] The value of a bar. decimal 0.0
color[nn] c[nn] The color to draw a pie shape. string empty color
itemnames in Determines if the bar names will be displayed. boolean true
namefont nf The name of the font to use for the item names. string Verdana
namefontsize nfs The point size of the font to use for the item names. integer 10
namefontcolor nfc The color of the font to use for the item names. string Black
namesonitem noi Determines if the bar names will be displayed on the item or below the graph. boolean false
itemvalues iv Determines if the bar values will be displayed. boolean true
valuefont vf The name of the font to use for the item values. string Verdana
valuefontsize vfs The point size of the font to use for the item values. integer 10
valuefontcolor vfc The color of the font to use for the item values. string Black
valuesonitem voi Determines if the bar values will be displayed on the item or above the item. boolean false
width w The pixel width of the graphic. integer 150
height h The pixel height of the graphic. integer 150
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
targetlinevalue tlv The numerical position a horizontal line should be added. integer 0
targetlinecolor tlc The color of the target line. string Red
targetlineweight tlw The size, or line weight, the target line will be drawn with. integer 2
border b Determines if the chart border should be displayed. boolean False

Samples for Testing

Click on the following links to see some sample graphs.

Name Description
Preview URL

Sample 1 A very simple chart. A Title, Width, Height and three values are defined.
The Marvelous and Stupendous Bar Graph bargraph.aspx?title=Edibles&width=230&height=150&legend=0&value1=4&value2=6&value3=2

Auto Ratings Sample Same as above ( With Titles ), different parameter values.
The Marvelous and Stupendous Bar Graph bargraph.aspx?w=300&height=150&title=Auto Ratings&name1=Mustang&name2=Explorer&name3=Mazda MX6&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, value99)
- Each 'name' parameter must be numbered uniquely.
- name and value parameters are not matched by number, but by instance order.
- The order of the value and name pair is not critical.
The Marvelous and Stupendous Bar Graph bargraph.aspx?width=230&height=150&title=Browser Preferences&name1=Mozilla Firefox&value1=194&name2=IE&name3=Opera&value2=362&value3=122&name44=Safari&value99=99

Programming Languages Sample
The Marvelous and Stupendous Bar Graph bargraph.aspx?height=300&title=Programming Languages&width=300&name1=JSharp&name2=Basic&name3=VB&value1=1942&value2=3622&value3=3122&name4444=C Sharp&value99=4599&value100=1011&name100=HTML




Below is another demonstrated use of this page.



HOW TO:

Display the bar graph as an image on your page.

<img alt='image name here' src='http://www.vegadiscoveries.com/resources/chartgraph/bargraph.aspx?legend=0&title=Customer Pay Rate (days)&width=700&height=250&value1=51.4&value2=59.2&value3=49.2&value4=68.1&value5=48.0&value6=48.8&value7=41.0&value8=0&value9=32.0&name1=2007 Q1&name2=Q2&name3=Q3&name4=Q4&name5=2008 Q1&name6=Q2&name7=Q3&name8=Q4&name9=2009 Q1' /> 


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