How to implement open_flash_chart_api in drupal?

    Install and configure open_flash_chart api : http://drupal.org/node/193583 Install charts module : http://drupal.org/project/charts After that create you can add following code to display charts
    <?php
    function flash_chart_example()
    {
           
    $sample_chart = array(
           
    '#title'        => t('Title of chart')
           
    '#plugin'       => 'openflashchart',
           
    '#type'         => 'line2D',
           
    '#height'       => 600,         // in pixels
           
    '#width'        => 650,         // in pixels

           
    array(
              array(
    '#value' => 10, '#label' => t('Sun')),
              array(
    '#value' => 25, '#label' => t('Mon')),
              ),
            );

            return
    charts_chart($sample_chart);
    }
    ?>
    Important : Use compatible version of open-flash-chart.swf and swfobject.js
    4
    Average: 4 (1 vote)