creating graph in php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ghjk
    Contributor
    • Jan 2008
    • 250

    creating graph in php

    Im using php and mysql for my web application. I want to create graphs(barchart s) using database values. But graphs depend on user selected values. Could any one tell me how can i do that? Anything useful for create graph?
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Originally posted by ghjk
    Im using php and mysql for my web application. I want to create graphs(barchart s) using database values. But graphs depend on user selected values. Could any one tell me how can i do that? Anything useful for create graph?
    have a look at jpgrahp

    Cheers

    Comment

    • ghjk
      Contributor
      • Jan 2008
      • 250

      #3
      Originally posted by markusn00b
      have a look at jpgrahp

      Cheers

      I'm currently using jpgraph.But i have problem with it. I can't add jp graph code into middle of my table.
      Then I got error:
      "JpGraph Error: HTTP headers have already been sent.
      Caused by output from file test.php at line 2.
      Explanation:
      HTTP headers have already been sent back to the browser indicating the data as text before the library got a chance to send it's image HTTP header to this browser. This makes it impossible for the library to send back image data to the browser (since that would be interpretated as text by the browser and show up as junk text).

      Most likely you have some text in your script before the call to Graph::Stroke() . If this texts gets sent back to the browser the browser will assume that all data is plain text. Look for any text, even spaces and newlines, that might have been sent back to the browser.

      For example it is a common mistake to leave a blank line before the opening "<?php". "

      Do u know what is the error?

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        Do not let us guess. Show some code around the place where the problem occurs (and do it within the appropriate code tags).

        Ronald

        Comment

        • Markus
          Recognized Expert Expert
          • Jun 2007
          • 6092

          #5
          Originally posted by ghjk
          I'm currently using jpgraph.But i have problem with it. I can't add jp graph code into middle of my table.
          Then I got error:
          "JpGraph Error: HTTP headers have already been sent.
          Caused by output from file test.php at line 2.
          Explanation:
          HTTP headers have already been sent back to the browser indicating the data as text before the library got a chance to send it's image HTTP header to this browser. This makes it impossible for the library to send back image data to the browser (since that would be interpretated as text by the browser and show up as junk text).

          Most likely you have some text in your script before the call to Graph::Stroke() . If this texts gets sent back to the browser the browser will assume that all data is plain text. Look for any text, even spaces and newlines, that might have been sent back to the browser.

          For example it is a common mistake to leave a blank line before the opening "<?php". "

          Do u know what is the error?
          It tells you the error.
          You aren't allowed to use the script after you have output html to the browser.

          Comment

          Working...