liberio

Modifying the XMLGenerator to set a static url for charts and FusionCharts.js file ?

Recommended Posts

Hi to the whole FusionCharts community,

 

 

 

First of all I want to thank you for what you have done, it is a great piece of work!

 

 

 

I would like to set a static value (hard coded) for paths containing the /Charts/*.swf files and the /JSClass/FusionCharts.js file.

 

 

 

Do you have any idea if it is possible and how to do this ?

 

 

 

Let me know if you need more details.

 

 

 

Again, good job guys and thanks in advance for your help.

Share this post


Link to post
Share on other sites

Hi,

Welcome to FusionCharts Forum. :)

I am afraid, I couldn't understand the query properly. :)

Could you please explain the "static value (hard coded)" issue a bit elaborately?

Also, please mention the server-side language that you are using to render the chart.

Awaiting your reply.

Share this post


Link to post
Share on other sites

Hello Sanjukta,

 

 

 

When creating my first chart using the official documentation (i.e. http://www.fusioncharts.com/docs/ -> Guide for General Users -> Basics -> Creating your First Chart), I need to copy the chart SWF file from Download Package > Charts and FusionCharts.js from from Download Package >JSClass folder respectively into a local folder.

 

However, I do not want to do it this way, and I prefer giving the url of a remote server where the chart SWF and FusionCharts.js files are located.

 

 

 

He is possible to do so ?

 

 

 

Hope I made it clearer this time.

 

 

 

Thanks.

Edited by Guest

Share this post


Link to post
Share on other sites

Hi,

Could you please let us know if you are using setDataURL method or setDataXML method to render the chart?

In case you are using setDataURL method where you have to fetch the XML from some different location, then the SWF file and .js file has to be kept within the same domain.

Else this is not possible with FsuionCharts.

In case you are using setDataXML method to render the chart, you can keep the SWF and.js file in any remote location.

Please make sure the paths for those files are mentioned correctly.

Hope this is some help. :)

Share this post


Link to post
Share on other sites

Dear Sanjukta,

 

 

 

How do I know whether I use setDataURL method or setDataXML one ?

 

 

 

Otherwise, my goal is to modify the XMLGenerator to take these remote url into account. However, the XMLGenerator seems to be a SWF file. Is is possible to modify it ?

 

 

 

Thanks.

Share this post


Link to post
Share on other sites

Hi,

How do I know whether I use setDataURL method or setDataXML one ?

Please refer to the following links to get detailed information on setDataURL and setDataXML methods:

 

Ref.- http://www.fusioncharts.com/docs/Contents/JS_setDataXML.html

  http://www.fusioncharts.com/docs/Contents/JS_setDataURL.html

my goal is to modify the XMLGenerator to take these remote url into account.

Could you please specify this a bit elaborately?

However, the XMLGenerator seems to be a SWF file. Is is possible to modify it ?

The XML generator is a tool that helps to generate the XML. Thus, it cannot be modified. The XML that is generated here can be simply copied and pasted to render the chart but cannot be used directly.

Please revert in case you have any further queries on the same.

Edited by Guest

Share this post


Link to post
Share on other sites

Sanjukta,

 

 

 

Let's take an example.

 

In fact, I just want to replace this html code:

 


<html>

<head>

	<script language="JavaScript" src="[b]FusionCharts.js[/b]"></script>

</head>

<body>

	<!-- Start Code for FusionCharts chart -->

	<div id="chartdiv" align="center">FusionCharts</div>

	<script type="text/javascript">

		 var myChart = new FusionCharts("[b]Column3D.swf[/b]", "FusionCharts_1", "900", "300", "0", "0");

		 myChart.setDataURL("Data.xml");

		 myChart.render("chartdiv");

	</script>

	<!-- End Code for FusionCharts chart -->

</body>

</html>

 

 

 

by this one:

 


<html>

<head>

	<script language="JavaScript" src="[b]http://www.my_url/FusionCharts.js[/b]"></script>

</head>

<body>

	<!-- Start Code for FusionCharts chart -->

	<div id="chartdiv" align="center">FusionCharts</div>

	<script type="text/javascript">

		 var myChart = new FusionCharts("[b]http://www.my_url/Column3D.swf[/b]", "FusionCharts_1", "900", "300", "0", "0");

		 myChart.setDataURL("Data.xml");

		 myChart.render("chartdiv");

	</script>

	<!-- End Code for FusionCharts chart -->

</body>

</html>

 

 

 

And I would like the XMLGenerator do it directly, i.e. without any modification by the user in the html file.

 

 

 

But you already answered to my question : the XMLGenerator can not be modified since its source code is not available.

 

 

 

Many thanks !

Edited by Guest

Share this post


Link to post
Share on other sites

Hi Sanjukta,

 

 

 

One more question : why is it possible to modify the FusionMaps GUI contrary to the FusionCharts XMLGenerator ?

 

They both are products provided by InfoSoft, aren't they ?

 

 

 

Thanks,

Share this post


Link to post
Share on other sites

Hi,

FusionCharts suite comprises of FusionMaps pack, along with the other 3 packs which is given out by InfoSoft Global (P) Ltd.

FusionMaps GUI is coded in HTML and hence a open source to modify as per requirements.

FusionCharts XML Generator is in Flash and hence compiled and closed.

The above are the reasons of why the former could be modified but the latter cannot.

Hope I had mede myself clear. :)

Share this post


Link to post
Share on other sites

Yes, but I wonder why InfoSoft chose flash (i.e closed manner) for FusionCharts and html (open manner) for FusionMaps ? Why setting a piece closed when all the product is open ? I do not understand the philosophy... Is there a technical restriction somewhere that needs flash instead of html ?

 

 

 

Many thanks,

 

Good afternoon.

Edited by Guest

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