I have been trying to integrate the Fusioncharts library with my Drupal 7 site.
Just to check if everything is working properly, I followed this documentation for creating a basic graph with data contained in Data.xml file; the entire documentation is here.
FYI, I need to use PHP as I am more comfortable with it.
I have extracted the downloaded folder into /sites/all/libraries/FusionChartsFree/; with changes in paths (nothing else); I have pasted the code in the given example into my Drupal 7 node with the php input filter enabled. I also have the libraries module installed.
<?php
//We've included ../Includes/FusionCharts_Gen.php, which contains FusionCharts PHP Class
//to help us easily embed the charts.
$name = "FusionChartsFree";
if ($path = libraries_get_path($name)) {
include $path . '/Code/PHP/Includes/FusionCharts.php';
}
?>
<html>
<head>
<?php
//You need to include the following JS file, if you intend to embed the chart using JavaScript.
//When you make your own charts, make sure that the path to this JS file is correct. Else, you
//would get JavaScript errors.
include($path.'/Code/FusionCharts/FusionCharts.js');
?>
<script type="Javascript" SRC="/sites/all/libraries/FusionChartsFree/Code/FusionCharts/FusionCharts.js"></SCRIPT>
<title>FusionCharts - Simple Column 3D Chart</title>
</head>
<body>
<?php
//Create the chart - Column 3D Chart with data from Data/Data.xml
echo renderChart("/sites/all/libraries/FusionChartsFree/Code/FusionCharts/Column3D.swf", "/sites/all/libraries/FusionChartsFree/Code/PHP/BasicExample/Data/Data.xml", "", "myFirst", 600, 300, false, true);
?>
</body>
</html>
I get the below output. It is pretty long; hence, I have put then in part by part in these pictures.
(FYI, those Flash files that appear in the output, do not display anything if I click on them.)
Now, suppose I remove the below line from the code.
<?php
include $path . '/Code/FusionCharts/FusionCharts.js';
?>
I get nothing. I mean only a text which reads "cahrt" in the below output.
My Question: How can I make Fusioncharts work in DRUPAL 7?
I am also having similar trouble with the pChart library too: Even pChart does not display anything, not even an error, or warning. Simply there is nothing in the node body.