Sign in to follow this  
gurkan

Chartobject.exportchart Is Not A Function

Recommended Posts

We are trying to export a Fusion Widget gantt chart, and are using a basic chart with:

 

<chart dateFormat='mm/dd/yyyy' outputDateFormat='hh12:mn ampm' hoverCapBorderColor='00ad03' hoverCapBgColor='1f1f1' ganttWidthPercent='98' ganttLineColor='00ad03' ganttLineAlpha='10' gridBorderAlpha='0' canvasBorderColor='00ad03' animation='0' showTaskStartDate='0' showTaskEndDate='0' showTaskNames='1' chartLeftMargin='1' chartRightMargin='1' exportEnabled='1' exportFileName='location' exportHandler='http://127.0.0.1:8080/Scheduler/pages/FCExporter.jsp' exportAtClient='0' exportAction='save'>
<categories>
<category start='11/24/2010 6:00:00' end='11/24/2010 15:59:59' label='Wednesday, 11/24/2010' />
</categories>
<categories fontSize='7'>
<category start='11/24/2010 06:00:00' end='11/24/2010 06:59:59' label='6' />
<category start='11/24/2010 07:00:00' end='11/24/2010 07:59:59' label='7' />
<category start='11/24/2010 08:00:00' end='11/24/2010 08:59:59' label='8' />
<category start='11/24/2010 09:00:00' end='11/24/2010 09:59:59' label='9' />
<category start='11/24/2010 10:00:00' end='11/24/2010 10:59:59' label='10' />
<category start='11/24/2010 11:00:00' end='11/24/2010 11:59:59' label='11' />
<category start='11/24/2010 12:00:00' end='11/24/2010 12:59:59' label='12' />
<category start='11/24/2010 13:00:00' end='11/24/2010 13:59:59' label='1' />
<category start='11/24/2010 14:00:00' end='11/24/2010 14:59:59' label='2' />
<category start='11/24/2010 15:00:00' end='11/24/2010 15:59:59' label='3' />
</categories>
<processes headerText='' align='left'>
<process name='' id='1106219' />
<process name='' id='1106218' />
<process name='' id='1106220' />
</processes>
<dataTable showProcessName='1' nameAlign='left' headerFontColor='000000' headerFontSize='11' headerFontIsBold='1'></dataTable>
<tasks showLabels='1' showStartDate='1'>
<task processId='1106219' start='11/24/2010 08:00:00' end='11/24/2010 11:00:00' label='man1 l2, waiter' color='003399' toolText='man1 l2, waiter, 08:00 AM - 11:00 AM, Cost: 22.89'/>
<task processId='1106218' start='11/24/2010 08:00:00' end='11/24/2010 12:00:00' label='emp1 l1, cook' color='3366cc' toolText='emp1 l1, cook, 08:00 AM - 12:00 PM'/>
<task processId='1106220' start='11/24/2010 08:30:00' end='11/24/2010 13:30:00' label='test last, cook' color='3366cc' toolText='test last, cook, 08:30 AM - 01:30 PM, Cost: 25.00'/>
</tasks>
<trendlines>
</trendlines>
</chart>

 

We have some basic JS which looks like:

 

function ExportMyChart() {
var chartObject = getChartFromId('chart1Id');
if( chartObject.hasRendered() ) {
   	chartObject.exportChart();
}
}

 

We've tested that chartObject is an HTML object, but both the hasRendered() and exportChart() fail as:

chartObject.exportChart is not a function

 

We are including FusionCharts.js

 

What else needs to be done?

 

Thanks!

Share this post


Link to post
Share on other sites

I am having the same issue, although I think it is with FusionCharts and not FusionWidgets.

 

 

How do I verify that regiserWithJS is on?

 

Hi,

 

You could do the following:

1. Please verify that registerWithJS is on.

2. Please verify the version of FusionCharts.js you are using.

 

Srividya Sharma

Data Visualization Made Easy With FusionCharts!!

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