I am trying to create dynamic charts and graphs on some of my drupal pages using XML/SWF Charts. For those who are not familiar with how the XML/SWF charts package works, you download a library of swf template files, and then pass the data you want to chart as xml to an html file, along with the type of chart you want to create, and the appropriate chart is generated. It's all client-side. Harry Slaughter created a SWF charts module, but unfortunately it is not compatible with Drupal 6. Instead I am creating function in one of my custom modules that embeds an XML/SWF chart right into the page when the function is called.

For example, a "reports" module has a "reports_generate_graph" function. Within this function I am storing all of the html in a variable, and then returning the variable. I can get the box border of the flash object when doing this, but not the actual content. I've tested outside of drupal, and everything works just fine. Any and all help is greatly appreciated. Note: sites/all/modules/custom/report/charts was derived using drupal_get_path. I'm just writing out the whole path.

Edit: Most of code does not display here on drupal forums. :-(

Comments

Try ...

... the instructions right below the textarea:

You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

Also might want to take a look at http://drupal.org/project/charts

Problem resolved. I wasn't

Problem resolved. I wasn't able to the charts being generated due to a module conflict with charts. After I disabled and uninstalled both charts and fusioncharts, and reinstalled fusioncharts it worked just fine.