Stevers

How To Combine Fusion Charts And Fusion Widgets In A Single Page (Again)

Recommended Posts

I read another topic where someone was having trouble combining FusionCharts and FusionWidgets on the same page. It's about a year old. I'm having the same problem and that solution didn't help me.

 

I've narrowed down the problem to a simple page with an angular chart (v3.1.1). I can get the chart to display when I use the corresponding FusionCharts.js file. However I can't get anything to show when I use FusionCharts.js from the FusionCharts v3.2.1 package. I've tried several methods to set the data (setDataXML, setChartDataUrl, setXMLUrl), but nothing seems to work. All these are the trial versions, but we're in the process of getting them licensed.

 

Do I need to go through the v3.1.1 .js file and rename all "FusionCharts" to "FusionChartsOld" or something like that so I can load both .js files? I'd prefer to have one .js file that supports both versions, but that doesn't like it's going to work.

 

-Stevers

Share this post


Link to post
Share on other sites

Hi Stevers,

 

Welcome to FusionCharts forum.

 

FusionCharts and FusionWidgets could be rendered in the same page using the newer version of FusionCharts.js file. The JS files available with FusionCharts pack v3.2.1 is the latest one.

 

Could you please send us the code to look into the issue?

 

 

 

 

 

I read another topic where someone was having trouble combining FusionCharts and FusionWidgets on the same page. It's about a year old. I'm having the same problem and that solution didn't help me.

 

I've narrowed down the problem to a simple page with an angular chart (v3.1.1). I can get the chart to display when I use the corresponding FusionCharts.js file. However I can't get anything to show when I use FusionCharts.js from the FusionCharts v3.2.1 package. I've tried several methods to set the data (setDataXML, setChartDataUrl, setXMLUrl), but nothing seems to work. All these are the trial versions, but we're in the process of getting them licensed.

 

Do I need to go through the v3.1.1 .js file and rename all "FusionCharts" to "FusionChartsOld" or something like that so I can load both .js files? I'd prefer to have one .js file that supports both versions, but that doesn't like it's going to work.

 

-Stevers

Share this post


Link to post
Share on other sites

Could you please send us the code to look into the issue?

 

 

Sure

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> 
<html>
<head>
<title>Failures</title>
<link rel="stylesheet" href="../dashboards.css" type="text/css">
</head>
<body>
<div id="currentChartContainer">loading current chart...</div>
<!-- <script type="text/javascript" src="/common2/FusionCharts/v3.2.1/FusionCharts.js"></script> (#1) -->
<script type="text/javascript" src="/common2/FusionWidgets/v3.1.1/FusionCharts.js"></script><!--  (#2) -->
<script type="text/javascript" src="/common2/FusionCharts/v3.2.1/jquery.min.js"></script>
<script type="text/javascript">

var chart = new FusionCharts( "/common2/FusionWidgets/v3.1.1/AngularGauge.swf", "currentChart", "100%", "70%", "0", "1" );
//	chart.setChartDataUrl( "current-data.xml", "xml" );
chart.setDataXML( '<chart caption="Caption" subCaption="SubCaption" animation="0" lowerLimit="0" upperLimit="7" gaugeStartAngle="180" gaugeEndAngle="0" palette="3"><colorRange><color minValue="0" maxValue="3" code="FF654F" /><color minValue="3" maxValue="5" code="F6BD0F" /><color minValue="5" maxValue="7" code="8BBA00" /></colorRange><dials><dial value="2" /></dials></chart>' );
chart.render( "currentChartContainer" );

</script>
</body>
</html>

 

Option #2 works. I can't get option #1 to work with any setData method I've tried, the page or chart area is completely blank. File FusionCharts.js from the FusionCharts folder has "@version 3.2.1-release" in the header comments.

 

Hmm... This may be a Firefox issue. Option #1 displays a gauge in IE (v7) and Chrome (v14), but not Firefox (v6.0.2) even after clearing the cache. I see no errors in the Javascript console. Any ideas?

 

-Stevers

 

P.S. Sorry for posting in this forum, it wasn't the one I was intending to use. I'm guessing it is the same forum that hosted the previous thread I found.

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

Can you please load the jQuery.min.js file before FusionCharts.js or just remove the same and give it a try?

 

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