I cant get the fusioncharts module to work hence Im trying to get plain vanilla fusioncharts (without the aid of module and api) to work with drupal.

The sample code below works outside of drupal ...

<?php
  include('../Class/FusionCharts_Gen.php');
  $FC = new FusionCharts("Column3D","600","500");
  $FC->setSWFPath("../FusionCharts/");
  $strParam="caption=Weekly Sales;xAxisName=Week;yAxisName=Revenue;numberPrefix=$;decimalPrecision=0;formatNumberScale=1";
  $FC->setChartParams($strParam);
  $FC->addChartData("40800","name=Week 1");
  $FC->addChartData("31400","name=Week 2");
  $FC->addChartData("26700","name=Week 3");
  $FC->addChartData("54400","name=Week 4");
?>
<html>
  <head>
    <title>First Chart Using FusionCharts PHP Class</title>
    <script language='javascript' src='../FusionCharts/FusionCharts.js'></script>
  </head>
  <body>

  <?
    # Render Chart
    $FC->renderChart();
  ?>

  </body>
</html>

The sample code works outside of drupal but when pasted inside as a content page, an error occurs on the fist include command statement. The error drupal spits out is as follows:

warning: include(../Class/FusionCharts_Gen.php) [function.include]: failed to open stream: No such file or directory in W:\www\drupal\includes\common.inc(1547) : eval()'d code on line 2.

Input format is set to PHP code. The Libraries (FusionCharts_Gen.php and others) are in the proper directories. Am I suppose to edit the file common.inc to somehow include the added fusioncharts libraries (if yes, how do I do this)? I have some basic knowledge on PHP programming and hoping someone could point me to the right direction.

Thanks in advance

Comments

brmassa’s picture

Status: Active » Fixed

Oliver,

this module aims to standardize the input for several chart plugings. So you should not use this FusionCharts-specific with this module.

regards,

massa

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.