Sign in to follow this  
Guest Madhumita

'FusionCharts' is undefined

Recommended Posts

hi,

We are employing Fusion charts in our application. I have FusionCharts in my webcontent folder and jar file in my lib folder. FusionCharts.js is there in my FusionCharts.js folder.

I have these two lines in my page

<script type="text/javascript" src="FusionCharts/FusionCharts.js"></script>

<

fc:render chartId="#{acctSummbean.chartId}" filename="../FusionCharts/FCF_Pie3D.swf" width="#{acctSummbean.width}" height="#{acctSummbean.height}" xml="#{acctSummbean.xml}"></fc:render>.

In JSP, this works fine. But when i did this in JSF(Trinidad), it shows JS error 'FusionCharts' is undefined. Am i doing something wrong here?

Thanks,

Phantom

Share this post


Link to post
Share on other sites

hi,

i solved the problem. The problem is in the way in which i gave the path of the file.

After changing from 

<script type="text/javascript" src="FusionCharts/FusionCharts.js"></script>

to

<

script type="text/javascript" src="../FusionCharts/FusionCharts.js"></script>

and

<

fc:render chartId="#{acctSummbean.chartId}" filename="FusionCharts/FCF_Pie3D.swf" width="#{acctSummbean.width}" height="#{acctSummbean.height}" xml="#{acctSummbean.xml}"></fc:render>

to

<

fc:render chartId="#{acctSummbean.chartId}" filename="../FusionCharts/FCF_Pie3D.swf" width="#{acctSummbean.width}" height="#{acctSummbean.height}" xml="#{acctSummbean.xml}"></fc:render> , it worked well in JSF.

Cheers,

Phantom

Share this post


Link to post
Share on other sites

i am using fusion charts in my spring application... i copied the charting code and made as jsp..

when i configured the jsp as welcome file with the required .js , .swf & data.xml files, it is working file,

but when i am trying to put the same files in web-inf/jsp folder as sample.jsp and configure the sample.jsp in configuration, when the link goes from welcome page

to my sample page containing the graph content, it is unable to print the graph, its just printing the html content inside that jsp but not the javascript or graph content,

when i looked into the code, there is a warning

 

'FusionCharts' is undefined'

 

should i do or configure anything or import any jars to make the fusion charts work in my jsp which is placed inside the web-inf/jsp folder..........!!!!!! help me please...

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi Subbu,

 

Thank you for the post :)

 

The error message ''FusionCharts' is undefined' comes up when the path to the FusionCharts.js is not proper or the FusionCharts.js file is not present in the mentioned path.

 

Can you please review the mentioned path to the FusionCharts.js file ?

 

It should be relative to the root of the web application.

 

Hope this helps !

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
Sign in to follow this