FusionCharts does not load with JUMI?

A multipurpose module, plugin and component

FusionCharts does not load with JUMI?

New postby Sopan » Tue Dec 28, 2010 10:34 pm

Hello,

Thank you for the excellent script.

I have using JUMI in many ways without a problem until I tried to load a tutorial sample FusionChart to my article. The sample chart does not load. I tested in Mozilla, Chrome and IE all not loading.

However, the chart will load as normal when I type the URL (localhost) in the browser. I save it in localhost/joomla15/cekap1/plugins/content/jumi/LearningFusionCharts/MyFirstChart/weekly-sales.html and it loads if direct from browser but not via Joomla! Here the code in Joomla! {jumi [plugins/content/jumi/LearningFusionCharts/MyFirstChart/weekly-sales.html]}.

The weekly-sales.html file contents,

<html>
<head>
<title>My First chart using FusionCharts</title>
<script type="text/javascript" src="FusionCharts/FusionCharts.js">
</script>
</head>
<body>
<div id="chartContainer">FusionCharts will load here!</div>
<script type="text/javascript"><!--

var myChart = new FusionCharts( "FusionCharts/Column3D.swf",
"myChartId", "400", "300", "0", "1" );
myChart.setXMLUrl("Data.xml");
myChart.render("chartContainer");

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

The folders are like this,
MyFirstChart/weekly-sales.html
MyFirstChart/Data.xml
MyFirstChart/FusionCharts/Column3D.swf
MyFirstChart/FusionCharts/FusionCharts.js
MyFirstChart/FusionCharts/highcharts.js
MyFirstChart/FusionCharts/jquery.min.js

Strange enough because the <div id="chartContainer">FusionCharts will load here!</div> loads correctly in the article page (without the tag of course).

Can you spot the problem or is it FisionCharts purposely doesn't allow it to be used in JUMI?

p/s: I know there are Joomla! version for FusionCharts, I just think that the web version is better.
Sopan
 
Posts: 2
Joined: Tue Dec 28, 2010 9:45 pm

Re: FusionCharts does not load with JUMI?

New postby Edvard » Wed Dec 29, 2010 2:55 pm

You don't need to include html, head, body, title tags, since joomla already has that. So the code should look like:
Code: Select all
<script type="text/javascript" src="FusionCharts/FusionCharts.js"></script>
<div id="chartContainer">FusionCharts will load here!</div>
<script type="text/javascript">
var myChart = new FusionCharts( "FusionCharts/Column3D.swf", "myChartId", "400", "300", "0", "1" );
myChart.setXMLUrl("Data.xml");
myChart.render("chartContainer");
</script>
Regards,

Edvard Ananyan - 2GLux Team

Please post a review at the Joomla Extensions Directory. It is very important for us!
Edvard
Site Admin
 
Posts: 1836
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: FusionCharts does not load with JUMI?

New postby Sopan » Wed Dec 29, 2010 6:17 pm

Hi,

Thank you for your respond and sorry about the code. I should have ignored the html tags.

However, even when I delete the html tags and use the new code it still shows the same result! I tried Advanced Graphs and Charts for PHP from jpowered.com and all their graphs shows correctly with JUMI. Advanced Graphs and Charts for PHP uses php and html code but FusionCharts uses flash.

Is it because Joomla! may not allows .swf to load in the article?

The new code,
Code: Select all
<script type="text/javascript" src="FusionCharts/FusionCharts.js">
</script>
<div id="chartContainer">FusionCharts will load here!</div>       
    <script type="text/javascript">         

      var myChart = new FusionCharts( "FusionCharts/Column3D.swf",
      "myChartId", "400", "300", "0", "1" );
      myChart.setXMLUrl("Data.xml");
      myChart.render("chartContainer");
               
   </script>
Sopan
 
Posts: 2
Joined: Tue Dec 28, 2010 9:45 pm

Re: FusionCharts does not load with JUMI?

New postby [email protected] » Tue Jan 11, 2011 9:38 am

Any solutions?
[email protected]
 
Posts: 2
Joined: Tue Jan 11, 2011 8:13 am

Re: FusionCharts does not load with JUMI?

New postby [email protected] » Tue Jan 11, 2011 10:01 am

@Sopan: It's not because of Joomla not displaying .swf in articles (that's not even true).

The problem, i think, is a Javascript conflict somewhere, either with your theme or another component/module, etc. I solved it by rendering it through HTML instead of JS. Check the FusionChart user guides to see how to implement a HTML rendering using the setup you have.

I'm using a slighted edited version of FusionCharts (Artio Fusion Charts), so I have a file called FusionCharts.php that contains my rendering classes. You need to find, and maybe link to, a similar file on your installation.
[email protected]
 
Posts: 2
Joined: Tue Jan 11, 2011 8:13 am


Return to Jumi

Who is online

Users browsing this forum: No registered users and 2 guests

cron