I need to generate a line graph based on results within a MySQL database, any ideas?
I must also point out that I do not have administrator rights to install things such as JGraph.
Google has a pretty comprehensive charting API available via javascript calls or simply image links. http://code.google.com/apis/charttools/index.html
You can use the GD library, right?
Should be able to use that to do a line graph as an image. You'd have to determine a scale and all that and figure out how to map that to the X and Y coordinates of the image, and then use that to plot the numeric data to the graph and use imageline() to draw the lines for it.
It would be the most compatible method. Java can be turned off and Flash isn't universally supported.
I don't want to give you a specific library to use, but if you searched google for "flash graph", you'll find a ton of flash graphic software. See http://www.google.ca/search?q=flash+graph&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
Note, these don't require anything to be installed on your server (unlike how jpGraph requires GD).
To support mobile devices, you can use a JavaScript charting library such as Flot (http://code.google.com/p/flot/).
Example : http://people.iola.dk/olau/flot/examples/basic.html
This would work for desktop (IE / Firefoex /Chrome / Safari) as well as mobile (iOS / Android / Blackberry ).
jqPlot has come on in leaps and bounds recently.
A few stand out features from my point of view:
Features from their site:
I am using jqPlot in a large project at the moment after trialling the following "competitors":
And for fun here is a fully working ASCII pie chart written in pure SQL: http://code.openark.org/blog/mysql/sql-pie-chart
You can make an bar-graph relatively easy with php, html and css.
HTML/CSS part: As pointed out by Col. Shrapnel above:
It's as easy as elementary school math and basic HTML just a couple divs of this kind
<div style="background-color:black;width:50%;"> </div> <div style="background-color:black;width:30%;"> </div> <div style="background-color:black;width:20%;"> </div>
Custom bar images: If you would like a slightly fancier bars, you can use your own customs images, manipulated trough the width: CSS property of the < img /> tag.
The search query bellow contains at least 2 comprehensible and easy tutorials, on how to make your own bar graph with PHP/ google search for detailed tutorials
This approach should be less resource consuming on the end-user's computer, compared to JavaScript APIs.