Sign in to follow this  
ChartsJazz

1. Can't get clickURL='j-myJSfunction()' to work. 2. Can't set registerWithJS flag.

Recommended Posts

The company I work for has the Enterprise version of FusionCharts.  I am having two problems.

1. I have followed the documentation and can't get clickURL to work in a pie2D chart.  clickURL='P-etc.' works to open a popup window, but clickURL='j-myJSfunction()' where myJSfunction() as a test just does alert('foo') doesn't work.  I have also tried clickURL='j-myJSfunction' without the parentheses.  The cursor on the chart changes to a hand but when I click nothing happens.  The debug window doesn't show any error.

2. The documentation describes the last two parameters when calling a chart as the debug flag and the registerWithJS flag and says that each one can be "0" or "1".  When I put two parameters I get "wrong number of arguments."  In addition, "0" or "1" for the debug argument do not work but true and false, without quotes, work.

Share this post


Link to post
Share on other sites
Guest Madhumita

Hi,

Will it be possible for you to attach the XML and the HTML code you are using?

It will be easier for us to resolve the issue then.

Share this post


Link to post
Share on other sites

Line breaks added here for ease of reading.  This is used within an .asp page.  I have the #include to the FusionCharts.asp file and the script link to FusionCharts.js.  Some of the chart parameters don't apply; they are left over from another version of the chart.

strChartXMLTransTotSmall=
<chart 
decimalPrecision='0' 
bgAlpha='100' 
bgColor='F5F5F2' 
showBorder='0' 
borderColor='ccccff' 
borderAlpha='0' 
showExportDataMenuItem='1' 
showZeroPies='1' 
formatNumberScale='0' 
showLabels='0' 
showValues='0' 
showPercentageValues='0' 
showPercentageInLabel='0' 
pieSliceDepth='15' 
pieBorderColor='000000' 
pieBorderThickness='1' 
showShadow='0' 
enableSmartLabels='0' 
isSmartLineSlanted='1' 
baseFont='Arial' 
baseFontSize='12' 
toolTipSepChar=':  ' 
baseFontColor='000000' 
pieRadius='40' 
animation='0' 
outCnvBaseFontColor='000000' 
clickURL='j-popupChartsPage()' 
caption='' >
<set label='B2G' value='446892' color='FF7538' toolText='B2G: 4.7%25' />
<set label='EDI' value='5071021' color='EE204D' toolText='EDI: 52.8%25' />
<set label='FHAC' value='1067529' color='9ACEEB' toolText='FHAC: 11.1%25' />
<set label='Mergers' value='729190' color='FCE883' toolText='Mergers: 7.6%25' />
<set label='Periodic' value='1623810' color='B4674D' toolText='Periodic: 16.9%25' />
<set label='SFISnet' value='276248' color='1F75FE' toolText='SFISnet: 2.9%25' />
<set label='FHAC-Excel' value='382362' color='926EAE' toolText='FHAC-Excel: 4%25' />
</chart>

Call renderChartHTML("FusionCharts/Charts/PIE2D.swf", "", strChartXMLTransTotSmall, "TransTotChart", "95", "95", false)   
The JavaScript function  popupChartsPage() for now just does alert('foo').  I will be using it to open a popup window with other charts and pass the strXML in the querystring.

Share this post


Link to post
Share on other sites

By reading more documentation I learned that the syntax when using FusionCharts with ASP is different for clickURL.  Here the syntax is clickURL='JavaScript:myJSfunction()' instea of clickURL='j-myJSfunction()'.  I tried this and it works.  However, the examples show, in the Call renderChart() function, two parameters after height and width as false, false.  Again, when I use two parameters I get "wrong number of arguments."

Share this post


Link to post
Share on other sites

Hi,

 

 

 

Classic ASP does not provide method overloading.

 

 

 

So, the number of arguments for the two methods - renderChart and renderChartHTML are different.

 

 

 

The signatures are :

 

 

 

renderChart(chartSWF, strURL, strXML, chartId, chartWidth, chartHeight, debugMode, registerWithJS)

 

 

 

 

 

renderChartHTML(chartSWF, strURL, strXML, chartId, chartWidth, chartHeight, debugMode)

 

 

 

Please mark that there is one less argument in renderChartHTML. The problem might be due to this. We need to conform to the number of arguments in ASP.

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