Ayan Pal

Error: FusionCharts is not defined

Recommended Posts

Guest Basundhara Ghosal

Hi Ravi,

Welcome to FusionCharts forum. :D

Could you please confirm that you have included the 'FusionCharts.php' file and the 'FusionCharts.js' file correctly in your project?

Share this post


Link to post
Share on other sites

 

7

 

8

 

9

 

10

 

11

 

12 Chart.

 

13

 

14

 

15 var chart_Column3D1 = new FusionCharts("/opt/FONapache2/htdocs/inform/application/FusionCharts_Enterprise/Code/FusionCharts/Column3D.swf", "Column3D1", "300", "250", "0", "0", "","noScale","EN");

 

16 //Provide entire XML data using dataXML method

 

17 chart_Column3D1.setDataXML("");

 

18 chart_Column3D1.render("Column3D1Div");

 

19

 

20

 

21

 

22

 

23

Edited by Guest

Share this post


Link to post
Share on other sites
Hi Ravi,

Please check that the path of FusionCharts.js is correct relative to your page .


<script language='javascript' src='/opt/FONapache2/htdocs/inform/application/FusionCharts_Enterprise/JSClass/FusionCharts.js'></script>
 if correct then please verify that your page successfully loaded the js file

Share this post


Link to post
Share on other sites

Is anybody here??? I am also having the same problem when I tried to use this plugin with codeigniter.

 

Please help me.

 

 

 

Hi: I am a newbie trying to build the report described in (http://www.fusioncha...FirstChart.html). I am getting "FusionCharts is not defined

 

[break on this error] var chart_Column3D1 = new FusionChart..."250", "0", "0", "","noScale","EN"); at line 15" error. Can you help.

 

 

 

My PHP code:

 

================

 

 

# Include FusionCharts PHP Class

 

include('/opt/FONapache2/htdocs/application/FusionCharts_Enterprise/Code/PHPClass/Class/FusionCharts_Gen.php');

 

 

 

# Create Column3D chart Object

 

$FC = new FusionCharts("Column3D","300","250");

 

# set the relative path of the swf file

 

$FC->setSWFPath('/opt/FONapache2/htdocs/application/FusionCharts_Enterprise/Code/FusionCharts/');

 

 

 

# Set chart attributes

 

$strParam="caption=Weekly Sales;xAxisName=Week;yAxisName=Revenue;numberPrefix=$";

 

$FC->setChartParams($strParam);

 

 

 

# add chart values and category names

 

$FC->addChartData("40800","label=Week 1");

 

$FC->addChartData("31400","label=Week 2");

 

$FC->addChartData("26700","label=Week 3");

 

$FC->addChartData("54400","label=Week 4");

 

 

 

?>

 

 

 

 

 

First Chart Using FusionCharts PHP Class

 

<script language='javascript' src='/opt/FONapache2/htdocs/application/FusionCharts_Enterprise/Code/FusionCharts/FusionCharts.js'>

 

 

 

 

 

 

# Render Chart

 

$FC->renderChart();

 

?>

 

 

 

 

 

===============

 

 

 

It's complaining at line 15

 

var chart_Column3D1 = new FusionCharts("/opt/FONapache2/htdocs/application/FusionCharts_Enterprise/Code/FusionCharts/Column3D.swf", "Column3D1", "300", "250", "0", "0", "","noScale","EN");

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now