Java Code
in Struts2 action ...
StringBuilder resultSb = new StringBuilder();
resultSb.append("<chart caption='" + custCode + " - " + (orderType.equals("All")?"Total":orderType) + " " + fiscalYear + "-" + String.valueOf(Integer.parseInt(fiscalYear)+3) + " BP Progress'"+
"formatNumberScale='"+Constants.FORMAT_NUMBER_SCALE+"' " +
"placeValuesInside ='1' " +
"canvasBgColor='D9E5F1' canvasBaseColor='D9E5F1' " +
"exportEnabled='1' exportAtClient='1' exportHandler='fcExporter1' exportFileName='MyFileName' " +
"showToolTip ='1' seriesNameInToolTip ='0' " +
"showLegend ='0' legendPosition ='BOTTOM' >");
resultSb.append("<categories> <category label='" + fiscalYear + "' /> <category label='" + String.valueOf(Integer.parseInt(fiscalYear)+1) + "' /> <category label='" + String.valueOf(Integer.parseInt(fiscalYear)+2) + "' /> <category label='" + String.valueOf(Integer.parseInt(fiscalYear)+3) + "' /> </categories>");
resultSb.append("<dataset seriesName='Rolling/Actual' showValues ='1' valuePosition ='ABOVE'>");
resultSb.append("<set value='203' />")
resultSb.append("</dataset>");
resultSb.append("<dataset seriesname='BP' renderAs='Line' anchorSides='4' anchorRadius='5' showValues ='1' valuePosition ='ABOVE'>")
resultSb.append("<set value='203' />");
resultSb.append("</dataset>");
resultSb.append("<styles> " +
"<definition> " +
" <style name='myValuesFont' type='font' size='11' bold='1' /> " +
"</definition> " +
"<application> " +
" <apply toObject='DataValues' styles='myValuesFont' /> " +
"</application> " +
"</styles>");
resultSb.append("</chart>");
return resultSb.toString();
in jsp
var chart3 = new FusionCharts("/js/fusionCharts/Charts/MSColumnLine3D.swf", "ChartId3", "920", "400", "0", "0");
url = '/BizReport/chart/showKeyCustomerChart3.action?master.keyCustNo='+getObjectValue("master.keyCustNo")+'&master.fiscalYear='+getObjectValue("master.fiscalYear") + '&master.orderType=' + getObjectValue("master.orderType") + '&master.currency=' + getObjectValue("master.currency") + '&master.businessRegion=' + getObjectValue("master.businessRegion");
chart3.setDataURL(url);
chart3.render("myChartContainer3");