nulurambabu

Fusion chart rendering problem in jsp

Recommended Posts

Hi,

I am new to Fusion charts.  I am using  FusionChartsCreator.createChart(..) method for getting charts in my JSP page.

It is working fine, in Websphere application server 6.0.  But in websphere portal server 6.0 it is throwing error as: error in executing command:

I am new to Fusion Charts. Here is the view source of my JSP:

 div id='ByCountryDiv' align='center'>

Chart.

</div>

<script type='text/javascript'>

var chart_ByCountry = new FusionCharts('/wps/myportal/!ut/p/c1/04_SB8K8xLLM9MSSzPy8xBz9CP0os3gPFy8DEw93IwMDAyA2CgvzdPJ2sTQycDcDykfikTcgRrefv1Gom4mnoaGFmauhgZGZh4mTT5ingbuLMTG6DXAAR0J2h4P8it_tIHl8rgPJ47HfzyM_N1U_Uj_KHLct5voh-gW5oaERBpkBGemKigBJrke5/dl2/d1/L0lDU0lKSmdvS1VRb0tVUSEvb0NvZ0FFSVFoakVDVUpSbUVBd0FuQmNFemdBIS9ZQTQ1NDUwLTVGMHN0eWowc3J5bndBISEvN19IREowNEhHMjAwMDIwMDJWVklCS0Q5MjBHNy9yNEEyazQyL3NwZl9BY3Rpb25OYW1lL3NwZl9BY3Rpb25MaXN0ZW5lci9zcGZfc3RydXRzQWN0aW9uL2pzcCEyZmNoYXJ0cyEyZkZ1c2lvbkNoYXJ0cyEyZkNvbHVtbjNELnN3Zg!!#7_HDJ04HG20002002VVIBKD920G7', 'ByCountry', '900', '400', '0', '0');

// Provide entire XML data using dataXML method

 

chart_ByCountry.setDataXML("

 <chart caption=' Total Active By Year - 2008 '

subCaption=''

yAxisName='Amount'

xAxisName='Month'

palette='2'

animation='0'

showValues='0'

formatNumberScale='1'

numberSuffix=''

labelDisplay='ROTATE'

numDivLines='5'

slantLabels='1'>

<styles>

 <definition>

<style type='font' name='CaptionFont' size='15' color='666666' />

<style type='font' name='SubCaptionFont' bold='0' />

 </definition>

 <application>

<apply toObject='caption' styles='CaptionFont' />

<apply toObject='SubCaption' styles='SubCaptionFont' />

 </application>

</styles>

<set label='JAN' value='61' />

<set label='FEB' value='-30' />

<set label='MAR' value='32' />

<set label='APRL' value='-187' />

<set label='MAY' value='113' />

<set label='JUN' value='182' />

<set label='JUL' value='211' />

<set label='AUG' value='63' />

<set label='SEP' value='106' />

<set label='OCT' value='52' />

<set label='NOV' value='36' />

<set label='DEC' value='16' />

 </chart>");

 

// Finally, render the chart.

chart_ByCountry.render("ByCountryDiv");

</script>

I think chart_ByCountry.render("ByCountryDiv") is not working on portal server!

Is there any chages required to work on portal server ?

Can anybody help in this issue?

Thanks in advance

Rambabu

Share this post


Link to post
Share on other sites

Hi,
 
Could you please change your XML string to a single line XML string and try again?
 
Example:
 
chart_ByCountry.setDataXML("<chart caption=' Total Active By Year - 2008 ' subCaption='' yAxisName='Amount' xAxisName='Month' palette='2' animation='0' showValues='0' formatNumberScale='1' numberSuffix='' labelDisplay='ROTATE' numDivLines='5' slantLabels='1' ><styles><definition><style type='font' name='CaptionFont' size='15' color='666666' /><style type='font' name='SubCaptionFont' bold='0' /></definition><application><apply toObject='caption' styles='CaptionFont' /><apply toObject='SubCaption' styles='SubCaptionFont' /></application></styles><set label='JAN' value='61' /><set label='FEB' value='-30' /><set label='MAR' value='32' /><set label='APRL' value='-187' /><set label='MAY' value='113' /><set label='JUN' value='182' /><set label='JUL' value='211' /><set label='AUG' value='63' /><set label='SEP' value='106' /><set label='OCT' value='52' /><set label='NOV' value='36' /><set label='DEC' value='16' /></chart>");

Share this post


Link to post
Share on other sites

Hi,

I tried with single line XML string. Still not rendering. but now it is giving javascript error. 

'chart_ByCountry' is undefined.

May be the problem is in the encoded url of .swf file.  My .swf file path : "jsp/charts/FusionCharts/MSColumn3D.swf"  

var chart_ByCategory = new FusionCharts('/wps/myportal/!ut/p/c1/04_SB8K8xLLM9MSSzPy8xBz9CP0os3gPFy8DEw93IwMDAyA2CgvzdPJ2sTQycDcDykfikTcgRrefv1Gom4mnoaGFmauhgZGZh4mTT5ingbuLMTG6DXAAR0J2h4P8it_tIHl8rgPJ47HfzyM_N1U_Uj_KHLct5voh-gW5oaERBpkBGemKigBJrke5/dl2/d1/L0lDU0lKSmdvS1VRb0tVUSEvb0NvZ0FFSVFoakVDVUpSbUVBd0FuQmNFemdBIS9ZQTQ1NDUwLTVGMHN0eWowc3J5bndBISEvN19IREowNEhHMjAwMDIwMDJWVklCS0Q5MjBHNy9BSXVRbzQwL3NwZl9BY3Rpb25OYW1lL3NwZl9BY3Rpb25MaXN0ZW5lci9zcGZfc3RydXRzQWN0aW9uL2pzcCEyZmNoYXJ0cyEyZkZ1c2lvbkNoYXJ0cyEyZk1TQ29sdW1uM0Quc3dm#7_HDJ04HG20002002VVIBKD920G7', 'ByCategory', '900', '400', '0', '0');

Thanks

 

 

Share this post


Link to post
Share on other sites

Hi,

 
I have found that you are defining "var chart_ByCategorybut using "chart_ByCountry", so could you please check that once?
 
Edited by Guest

Share this post


Link to post
Share on other sites
Hi,

sorry, i pasted another page url.  I am using the same var for executing the .render() method. I found, the javascript error due to explorer version.  We r getting same javascript error, but application working fine in Websphere application server6.0.  But in portal server 6.0, we r not getting the charts.  Will the portal server supports Fusion charts properly !? I think server is not able to return the response properly !!

Thanks

 

Share this post


Link to post
Share on other sites
Hi Friend,

I checked the link, u have passed me.  But i did'nt get any info from that, b'coz it requires paid subsciption.   I changed my .swf file path from  ' jsp/charts/FusionCharts/MSColumn3D.swf '  to  ' /jsp/charts/FusionCharts/MSColumn3D.swf ' . Now i didn't get any error. My page is loading.  But it is not playing the flash movie. In that place, It showing the empty space.  When i right click there, it showing " movie not loaded ". 

Can u please send any suggetions resolving this issue. 

Thanks in advance.

 

Share this post


Link to post
Share on other sites

Hi,

 
Could you please try using these methods:
 
1. If your .swf file is packaged inside the portlet, you need to encode the URL the same way you would encode the URL to a .gif file for an IMG tag.
 
 
2. For IBM WebSphere Portal Server 6.0, the solution is to declare in your object code a version < 7.0.  I'm not sure why that is, unless websphere portal itself has a built in flash plugin for flash rendering to the client which is independents of the clients plugin.
 
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"

width="20%" height="20%" id="CSI_Flash_ENG" align="middle">

  <param name="allowScriptAccess" value="sameDomain" />

  <param name="allowFullScreen" value="false" />

  <param name="movie" value="CSI_Flash_ENG.swf" /><param name="quality"

value="high" /><param name="bgcolor" value="#ffffff" />   <embed

src="CSI_Flash_ENG.swf" quality="high" bgcolor="#ffffff" width="20%"

height="20%" name="CSI_Flash_ENG" align="middle"

allowScriptAccess="sameDomain" allowFullScreen="false"

type="application/x-shockwave-flash"

pluginspage="http://www.macromedia.com/go/getflashplayer" />

  </object>

 
Source:
 
(If you are not getting this page's solution then please try to search with "Getting Macromedia Flash Movie to run in Websphere Portal 6.0 portlet" text in google, and goto its first result, hopefully you will be able to see the complete page)

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