Installation

Last modified: September 17, 2009 - 22:36
  1. Download and install Open Flash Chart 2 API module
  2. Download the latest Open Flash Chart 2 package from http://teethgrinder.co.uk/open-flash-chart-2/downloads.php
  3. Extract the package, put the open-flash-chart.swf file in the module's directory. The directory layout should look like this:

    ofc_api
        |-- ofc_api.info
        |-- ofc_api.module
        |-- swfobject.js
        |-- open-flash-chart.swf
        |-- ...

  4. If you want to use an external library e.g. the one that comes with Open Flash Chart 2 package, copy the php-ofc-library directory into the module's directory as well. The resulting directory layout should look like this:

    ofc_api
        |-- ofc_api.info
        |-- ofc_api.module
        |-- swfobject.js
        |-- open-flash-chart.swf
        |-- php-ofc-library
            |-- open-flash-chart.php
            |-- ...
        |-- ...

  5. Configure Open Flash Chart 2 API by going to /admin/settings/ofc_api

  6. You can verify the installation by creating a new Page or Story, set input format to PHP code and put the following code in the body:

    <?php
       
    print ofc_api_render();
    ?>

    Click the "Preview" button, if the sample chart shows up then you're good to go :)

 
 

Drupal is a registered trademark of Dries Buytaert.