1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

draw graphs in php

Discussion in 'PHP' started by ycc, Jun 24, 2010.

  1. #1
    How can I draw graphs and make charts in PHP?
    I have some simple statistics I want to display, preferably in an attractive way.
    I remember using gdlib a couple of years ago. I was rather new then, but as I remember gdlib contained very basic, low level, functions.
    Is there any library for making graphs and charts out of statistics.
    I usually keep a LAMP server.
    I found a library called graPHPite. It came from sourceforge, but downloaded as a Windows executable. I don't understand how to install it.
    I may have to port the page to another Linux server where I cannot install anything, only make pages.
    Since I make pages for open source operating systems I prefer, on this instance, not to use Flash.
    Thank you.
     
    ycc, Jun 24, 2010 IP
  2. clox.c

    clox.c Peon

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i usually go with either jpgraph (http://jpgraph.net/) or graPHPite, which has some great documentation online as well as tutorials
     
    clox.c, Jun 24, 2010 IP
    ycc likes this.
  3. ycc

    ycc Peon

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks a lot. jpgraph also seems like a very good alternative. (I also found that I must have been tired last night and didn't download the correct graPHPite file. graPHPite also comes in traditional tarball which is what I want.)
    Thanks clox.c.
     
    ycc, Jun 25, 2010 IP
  4. ycc

    ycc Peon

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    today I also understand why I didn't find the graPHPite tarball ("Linux version") in the graPHPite page. yesterday I browsed there from Windows and a big green button appeared for the Windows download. Today I browsed there from Linux but now the Linux version appeared. Sourceforge highlights the version appropriate for the system you surf with. OK it is good, but it also demands some thinking if you want another version. Well I should just read the small print better ;)
     
    ycc, Jun 25, 2010 IP
  5. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #5
    http://pchart.sourceforge.net/

    I've been using this one for a while. Very quick and makes nice easily modifiable graphs and charts.

    If you're using jpgraph for any commercial usage, you have to pay for it. pchart if totally free.
     
    jestep, Jun 25, 2010 IP
    ycc likes this.
  6. ycc

    ycc Peon

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks jestep it looks real good.

    - (un-)fortunately right now I am just making pages to promote open source so jpgraph will not charge me, ;) I just got the first graph going with it, but it is really good to have choices.

    Usually I say that a main reason to use open source is that it is easy to find software (you don't drown in the commercial jungle of Windows programs) but in this case there were so many commercial and Flash options that I am really happy for the advice I got here, thanks.
     
    ycc, Jun 25, 2010 IP
  7. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80
    #7
    Yeah pchart is too nice and its free for any purpose
     
    roopajyothi, Jun 25, 2010 IP
  8. ycc

    ycc Peon

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Sure it is better to have a completely free version. My next try will be with pChart.

    The simple diagram I made with jpgraph (by just modifying an example of theirs) came out well, anyway.

    It took over an hour to install and understand how jpgraph worked, though. I must say the installation instructions (both for advanced and other users) were a little bit of the kind for lunar missions. (Of course they are good if you get a hangup with your server.) Finally I just copied the files to a directory and made the include-statements point there. It works fine. (Documentation and examples of usage are splendid and works real well otherwise.)
     
    Last edited: Jun 26, 2010
    ycc, Jun 26, 2010 IP