Closed Thread
Results 1 to 4 of 4

Thread: Creating bar graph using PHP (dynamic values)

  1. #1
    Join Date
    Jul 2009
    Posts
    5
    Rep Power
    0

    Creating bar graph using PHP (dynamic values)

    Hi all,

    I need to create a bar graph using php, the values of x-axis and y-axis are dynamic coming from database, Am trying my best to do it but finding it difficult. Has anyone done this or is there php library files for doing this.


    Thanks,
    Shakeeb

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Apr 2009
    Location
    Trapped in my own little world.
    Posts
    2,487
    Rep Power
    33

    Re: Creating bar graph using PHP (dynamic values)

    You'd simply create the image and plot the points yourself, or draw the image bring it in and draw the points.

    For a bar graph... create a blank image, define a few colors, draw some rectangles based on your dynamic values output the image.

    PHP has helpful examples.
    PHP: imagefilledrectangle - Manual

    Enjoy!

  4. #3
    Join Date
    Jul 2009
    Posts
    5
    Rep Power
    0

    Re: Creating bar graph using PHP (dynamic values)

    Quote Originally Posted by BlaineSch View Post
    You'd simply create the image and plot the points yourself, or draw the image bring it in and draw the points.

    For a bar graph... create a blank image, define a few colors, draw some rectangles based on your dynamic values output the image.

    PHP has helpful examples.
    PHP: imagefilledrectangle - Manual

    Enjoy!

    Thank you!

  5. #4
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20

    Re: Creating bar graph using PHP (dynamic values)

    I use JavaScript and CSS for all my graphs. I've also used Google Charts.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PHP creating dynamic jquery head script
    By scottybrannan in forum PHP Development
    Replies: 6
    Last Post: 07-22-2011, 12:19 PM
  2. Drawing Graph
    By ahmed in forum Java Help
    Replies: 3
    Last Post: 06-09-2011, 07:26 PM
  3. creating pie graph using c language
    By masangzkie in forum C and C++
    Replies: 2
    Last Post: 11-30-2010, 09:09 AM
  4. creating a +/- poll (returning multiple values)
    By SuchTheFool in forum PHP Development
    Replies: 5
    Last Post: 06-08-2010, 03:50 AM
  5. Help with creating a Console Graph
    By Alex_j in forum C# Programming
    Replies: 3
    Last Post: 11-22-2009, 08:31 AM

Tags for this Thread

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