Joey Morani
Joey Morani

Reputation: 26581

How to make/generate a graph image depending on values in a database?

How could I make an image graph from values in a database? The idea came from "Steam", which uses a graph to show how many users are online. How could I do the same thing? It seems like the graph is one whole image; not made up of parts. Here's an image of the graph from Steam:
alt text http://d-load.org/public/steam-graph.PNG

Upvotes: 3

Views: 3482

Answers (8)

SuryaPavan
SuryaPavan

Reputation: 347

There are many javascript-tools. For example, you can choose jQuery's plugin - jqplot or Dojo charting etc... With those, you can generate very good-looking charts/graphs.

Upvotes: 0

Nazrul Muhaimin
Nazrul Muhaimin

Reputation: 373

if you are the javascript lover use this, http://raphaeljs.com/

they keep updating and many advance function.

Upvotes: 1

niggles
niggles

Reputation: 1034

I use FLOT with Jquery -> http://code.google.com/p/flot/

I find it easier to work with CSS than GD library to get the layout I want.

Upvotes: 0

Joel
Joel

Reputation: 3060

The easiest way is using the Google Chart API. You can generate a graph by simply creating a url with your values (basic example)

Upvotes: 3

Mitch Dempsey
Mitch Dempsey

Reputation: 39869

You want to use JPGraph, it is a very power PHP graphing library. http://www.aditus.nu/jpgraph/

Upvotes: 5

Felix
Felix

Reputation: 89566

+1 for Svisstack's link. Here's another one (less supported, less documented, but more features): http://www.php.net/imagick

Upvotes: 2

Savageman
Savageman

Reputation: 9477

You will mainly need to keep a track of how many users were connected at each period of time. Drawing the graph is easy, they are some really neat library to help you with it. ;)

Upvotes: 2

Svisstack
Svisstack

Reputation: 16616

Use this GD module from PHP. http://php.net/manual/en/book.image.php

Upvotes: 4

Related Questions