Advanced Search

Results 1 to 5 of 5

Thread: php graphs

  1. #1
    Join Date
    Aug 2009
    Posts
    74
    Thanks
    7
    Thanked 1 Time in 1 Post

    Default php graphs

    can we have php line graphs , that means dynamically i will get two values (0.0 to 300) then the line graph should indicate the two numbers and also according to numbers changing dynamically the line graph also must change . if this is possible plz help me out

  2. #2
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    557
    Thanks
    8
    Thanked 66 Times in 66 Posts

    Default

    - Josh

  3. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,154
    Thanks
    260
    Thanked 690 Times in 678 Posts

    Default

    Be warned-- the GD library is very resource intensive and will be at the least slow-- at worst, it'll cause problems with your server (overloading it and possibly getting shut down by the host-- I've had this happen).
    However, if you keep your images reasonably small (I wouldn't go much above 300x300px often), then it should be ok.
    The documentation and use of the GD library is confusing as well. So if you're going to design your own graphs with it allow yourself lots of time to work through the bugs. With enough patience, it'll eventually result in something usable.

    That said, it's a very promising tool you may want to explore.

    There is also the option of imagemagick, another library similar to GD that allows image manipulation in PHP. Some like it better, though I'm sure it has its problems too.

    For just this purpose (line graphs), the link above looks like a great tool, so don't think I'm saying not to use that-- just that you should know a bit more about GD before getting much beyond that.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  4. #4
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    557
    Thanks
    8
    Thanked 66 Times in 66 Posts

    Default

    IMO, i've never had trouble understanding docs for the GD, it's always been very intuitive for me. As for the slowing the server down problem, it is true that that happens. Be careful with how much stuff you put on it [lines, imagecopy, etc].
    - Josh

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,154
    Thanks
    260
    Thanked 690 Times in 678 Posts

    Default

    It took me a little to get used to some of the basics, but that's easy enough now. I've done some very (maybe too) complicated projects with it and ended up stuck. I wrote a script that did the bluescreen effect from movies (film an actor in front of blue and then the computer removes the blue and puts in a background), and that turned out ok, but still was kinda odd sometimes. And I tried to make a full image editor, which didn't get very far.
    But, yes, keep it simple and it'll probably go just fine. Once you get carried away with complexities in GD, though, be prepared for odd results.

    The other problem I have with it is that the php.net function references for GD are limited, I feel, compared to what they have for all the other functions. They're useful, just a bit harder to understand (maybe just because there's less attention paid to them because fewer people use the library).
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •