i am thinking to use php to read plain text... and draw graph. what is the best approach? i googled and found JpGraph which looks kinda cool.. not sure if it is commonly used though.

Recommended Answers

All 6 Replies

PHP is extremely powerful.

An so it is to read/edit/process plain text, as well as graphs - . But with graphs, it depends on which libraries you have installed. I would recommend using google's graphs tool. I like it and used it in several sites.

The other alternative is to do simple mathematics and use a CSS color or background image, and let it dynamically "draw" your graph, by multiplying and dividing to get a definite size for each bar. Almost similar to a poll script.

Use PHP Report Maker. its coooooooooooool

PHP is extremely powerful.

An so it is to read/edit/process plain text, as well as graphs - . But with graphs, it depends on which libraries you have installed. I would recommend using google's graphs tool. I like it and used it in several sites.

The other alternative is to do simple mathematics and use a CSS color or background image, and let it dynamically "draw" your graph, by multiplying and dividing to get a definite size for each bar. Almost similar to a poll script.

i looked it up and it looks like google's graphs tool have to depend on the google server. i am looking for something that can read notepad text and draw graphs simply.. please let me know if i am wrong. i actually kinda hope if google graph can work offline

jpGraph is a very full featured and very powerful graphing library.
Its not flashy and its not going to produce flash charts but it definitely gets the job done.

If you do want some fancier charts but still want to be able to use the system without relying on google's servers then check out Open Flash Chart 2 http://teethgrinder.co.uk/open-flash-chart-2/

ideally for what i need, i would like to have something that doesn't need any overhead such as web server, internet access, mysql database, google server etc.. i just simply want to use php to read a text file and create some kind of graph to represent the data.

after a bit of research here is my summery (correct me if i am wrong)
google graph tool ----> i need internet access to connect to google server

php report tool ---> i need to setup mysql (i only need to read data from text)

jpGraph --> i think i still need to setup a web server to make it work.. but it is the closest solution ... i think i have decided to try jpGraph

now i ran into a problem and i really wish if someone could point it out..
1. I downloaded and installed WAMP 2.0
2. I downloaded the jpGraph library
3. i unzipped it and placed it under my ""www" folder
4. i edit my php.ini
include_path = ".:C:/wamp/www"

when running an example code i got

JpGraph Error: 25001 This PHP installation is not configured with the GD library. Please recompile PHP with GD support to run JpGraph. (Neither function imagetypes() nor imagecreatefromstring() does exist)

in general, how do we add a library to our php? the error message sounds the installation from WAMP diidn't come with the GD library.

thanks

Use PHP Report Maker for Graphs. its coooooooooool

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.