Sign in to follow this  
Kranthi

Fusioncharts With Struts

Recommended Posts

Hi Experts,

I am new to Fusioncharts and i want to insert fusion charts in my struts application following is what i have done please let me know where i have gone wrong.

 

1. i have downloaded fusion charts and i have copied "swf"(of my own choice ) and jusion-charts.js into my project folder.

2. I wrote the following code in jsp that i need the Fusion chart.

FusionChart chart = new FusionChart(Swflocation,height, width);

chart.setURL("ChartAction.do");

//code to set the div in which the chart need to be displayed.

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

Welcome to the FusionCharts Forum.

 

Thank you for the post.

 

You may use the <fc: > tag to render the chart.

 

Ref. Code:

<c:set var="folderPath" value="../../FusionCharts/"/>
<jsp:useBean id="chartData" class="com.fusioncharts.sampledata.ExportRenderData"/>
<fc:render chartId="${chartData.chartId}" swfFilename="${folderPath}${chartData.swfFileName}  width="100%"  height="400" debugMode="false"  registerWithJS="true" xmlUrl="${chartData.saveUrl}" > </fc:render>

 

The path should be relative to the web application root.

 

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