Home / Free JavaScripts / Images & Music / Here
Cut & Paste JavaScript Graph-it!
|
Description: Create graphs out of raw data using Graph It! Just input the name/value pairs of the involved graph elements, and leave the rest to the script. The values can be either absolute or percentage (using two versions of script).
Graph-it allows you to render more than one graph on the same page simply by invoking the key function multiple times.
Example:
Example 1 (using absolute values)
What is your favorite news site? |
Example 2 (using percentage values)
What is your favorite news site? |
Since Example 1 is created using absolute values, the script also displays the total value (participants) at the end.
Directions
Step 1: Below contains two versions of Graph It!, the first requiring that the graph values be absolute (ie: 35, 123), while the second, in percentage (ie: 25%, 75%). Choose ONE of the below scripts, and add it to the BODY section of your page:
Absolute values version:
Step 2: Save the following image (by right clicking, and selecting "save as"), and upload to your web site. It's the image used by the script to create the bars:
(enlarged for easier download).
Follow the comments inside script to input your own data.
Enjoy!