Professional Web Applications Themes

[PHP-DEV] Graphs and Charts - PHP Development

Hi all, It may does not make sense, but I'm writing a web based script in C++ and now I need to build 3D pie/bar charts. The best solution and quality I have found was JpGraph that uses PHP Gd Library / Functions. I was thinking about using the PHP source code in my C++ program to generate the charts insted of using the main GD code from Boutell - because the two versions are different, Boutell's GD doesnt have native functions to build 3D images. Is it possible to use the PHP Header in my C++ program to use ...

  1. #1

    Default [PHP-DEV] Graphs and Charts

    Hi all,

    It may does not make sense, but I'm writing a web based script in C++
    and now I need to build 3D pie/bar charts. The best solution and quality
    I have found was JpGraph that uses PHP Gd Library / Functions.

    I was thinking about using the PHP source code in my C++ program to
    generate the charts insted of using the main GD code from Boutell -
    because the two versions are different, Boutell's GD doesnt have native
    functions to build 3D images.

    Is it possible to use the PHP Header in my C++ program to use the
    features of GD that exits into PHP ?

    Thanks in advance and sorry if it does not make sense.

    Regards.
    MENDES, Guilherme

    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Guilherme A. Mendes Guest

  2. #2

    Default Re: [PHP-DEV] Graphs and Charts

    You should have a look at the gdchart library. There is a PHP extension
    for it in pecl.

    -Rasmus

    On Thu, 30 Oct 2003, Guilherme A. Mendes wrote:
    > Hi all,
    >
    > It may does not make sense, but I'm writing a web based script in C++
    > and now I need to build 3D pie/bar charts. The best solution and quality
    > I have found was JpGraph that uses PHP Gd Library / Functions.
    >
    > I was thinking about using the PHP source code in my C++ program to
    > generate the charts insted of using the main GD code from Boutell -
    > because the two versions are different, Boutell's GD doesnt have native
    > functions to build 3D images.
    >
    > Is it possible to use the PHP Header in my C++ program to use the
    > features of GD that exits into PHP ?
    >
    > Thanks in advance and sorry if it does not make sense.
    >
    > Regards.
    > MENDES, Guilherme
    >
    >
    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Rasmus Lerdorf Guest

  3. #3

    Default Re: [PHP-DEV] Graphs and Charts

    Hi !

    I had the same problem, and i solve it by the use of the 'embed' sapi for PHP.

    Just link you application with it and you will be able to call (not tested
    but should be near ok):

    int run_php_script( const char *script_file ) {
    zend_file_handle file_handle;;
    int argc= 1
    char * argv[]= { "php_embed" };
    int ret;

    file_handle.filename = estrdup(script_file);
    file_handle.type = ZEND_HANDLE_FILENAME;
    file_handle.opened_path = NULL;
    file_handle.free_filename = 0;

    PHP_EMBED_START_BLOCK( argc, argv );
    ret= php_execute_script( file_handle TSRMLS_CC);
    PHP_EMBED_END_BLOCK();

    return ret;
    }

    and then call anywhere in your code:
    run_php_script( "myJpGraphCode.php" );

    Just a problem: all outputs are on stdout !
    But you can buffer the outputs in the php script and write them to a file.

    I hope this will be helpful !

    Eric


    At 20:44 30/10/2003, you wrote:
    >Hi all,
    >
    >It may does not make sense, but I'm writing a web based script in C++
    >and now I need to build 3D pie/bar charts. The best solution and quality
    >I have found was JpGraph that uses PHP Gd Library / Functions.
    >
    >I was thinking about using the PHP source code in my C++ program to
    >generate the charts insted of using the main GD code from Boutell -
    >because the two versions are different, Boutell's GD doesnt have native
    >functions to build 3D images.
    >
    >Is it possible to use the PHP Header in my C++ program to use the
    >features of GD that exits into PHP ?
    >
    >Thanks in advance and sorry if it does not make sense.
    >
    >Regards.
    >MENDES, Guilherme
    >
    >--
    >PHP Internals - PHP Runtime Development Mailing List
    >To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]
    --
    PHP Internals - PHP Runtime Development Mailing List
    To unsubscribe, visit: [url]http://www.php.net/unsub.php[/url]

    Eric COLINET Guest

  4. Moderated Post

    Default Re: [PHP-DEV] Graphs and Charts

    Removed by Administrator
    Guilherme A. Mendes Guest
    Moderated Post

Similar Threads

  1. watermark on charts/graphs
    By misterverb in forum Coldfusion Server Administration
    Replies: 1
    Last Post: May 16th, 08:33 PM
  2. Flash error when creating charts and graphs
    By ICI-MASA in forum Coldfusion Flash Integration
    Replies: 1
    Last Post: May 26th, 03:12 PM
  3. Help with Graphs
    By Dimitry_Ekzarkhov@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 2
    Last Post: February 27th, 09:49 PM
  4. Library for creating Charts and Graphs.
    By EdL in forum Mac Programming
    Replies: 1
    Last Post: August 11th, 10:23 PM
  5. Charts and Graphs with PHP
    By MT in forum PHP Development
    Replies: 1
    Last Post: July 21st, 09:56 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139