Sign in to follow this  
chrisramakers

Issue When Using Fusionwidgets And Fusioncharts On One Page

Recommended Posts

We are currently working on an update to one of our sites for ipad compatibility so we downloaded the latest version of Fusioncharts and fusionwidgets and migrated all our charts to the javascript highcharts implemenation.

Yet, there rises a problem when we add one of the FusionWidgets to the page. From the moment we add the widget to the page the following javascript error occurs: Uncaught TypeError: Cannot call method 'push' of undefined

 

I've checked and doublechecked the paths to the swf's and all seem to be ok. I'm using FusionCharts XT v3.3.2 release 3880 and FusionWidgets version 3.1.1

 

Below is a simple mockup that also triggers the error here (OSX, Chrome stable channel).

When removing the setCurrentRenderer line everything works fine with the flash charts, if the line is added the error occurs and the Chart renders fine but the widget doesn't render at all.

 

<html>
<head>
   <title>My First chart using FusionCharts</title>
   <script type="text/javascript" src="/chartsxt/FusionCharts.js"></script>
</head>
<body>
   <div id="chartContainer">FusionCharts will load here!</div>
   <div id="widgetContainer">FusionWidget will load here!</div>
   <script type="text/javascript">
       FusionCharts.setCurrentRenderer('javascript');

       var data = "<chart caption='Weekly Sales Summary' xAxisName='Week' yAxisName='Amount' numberPrefix='><set label='Week 1' value='14400' /><set label='Week 2' value='19600' /><set label='Week 3' value='24000' /><set label='Week 4' value='15700' /></chart>";
       var myChart = new FusionCharts("/chartsxt/Column3D.swf", "myChartId", "400", "300", "0", "1");
       myChart.setXMLData(data);
       myChart.render("chartContainer");

       var widgetData = "<chart lowerLimit='0' upperLimit='100' lowerLimitDisplay='Bad' upperLimitDisplay='Good' gaugeStartAngle='180' gaugeEndAngle='0' palette='1' numberSuffix='%' tickValueDistance='20' showValue='1'><colorRange><color minValue='0' maxValue='75' code='FF654F'/><color minValue='75' maxValue='90' code='F6BD0F'/><color minValue='90' maxValue='100' code='8BBA00'/></colorRange><dials><dial value='92' rearExtension='10'/></dials></chart>";
       var myWidget = new FusionCharts("/chartsxt/widgets/AngularGauge.swf", "myWidgetId", "400", "200", "0", "0");
       myWidget.setDataXML(widgetData);
       myWidget.render("widgetContainer");
   </script>
</body> </html>

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Welcome to FusionCharts Forum! smile.gif

 

I am afraid, FusionWidgets 3.1.1 does not support JavaScript / HTML5 chart, at this time.

This will be implemented in our next release of FusionWidgets i. e v 3.2.

We are not able to commit you any exact timeline regarding the release, but we will definitely get back to you once there is any news from our end.

 

Thank you very much for your continued patience and patronage.

 

Hope you have a great day!

Share this post


Link to post
Share on other sites

Hi Angshu,

 

Thanks for the swift and clear response.

One word of advice tho, please update the documentation to reflect this limitation, it would have saved me a couple of hours debugging. The documentation clearly states that charts and widgets can be used side by side on a single page, a little note that it won't work when enforcing javascript rendering might have saved my day, and more important ... my planning :D

 

regards,

Chris

Hi,

 

Welcome to FusionCharts Forum! smile.gif

 

I am afraid, FusionWidgets 3.1.1 does not support JavaScript / HTML5 chart, at this time.

This will be implemented in our next release of FusionWidgets i. e v 3.2.

We are not able to commit you any exact timeline regarding the release, but we will definitely get back to you once there is any news from our end.

 

Thank you very much for your continued patience and patronage.

 

Hope you have a great day!

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