Sign in to follow this  
a.premkumar

Javascript Fallback Is Not Working For Lineargauge

Recommended Posts

Hello,

 

       I am trying to load a Linear Gauge chart in my application. I have done it with the div and render methodology. It is working fine when flash is enabled. But when I check loading the chart after disabling flash, I get some error from FusionChart.js

 

Please I need to solve this as soon as possible. I have given the required details below.

 

Version being used : 3.2.1

 

Error log: 

["#3 [linearChartId] fired "beforedataupdate" event. "] 192.168.8.39:17
["#4 [linearChartId] fired "dataupdated" event. "] 192.168.8.39:17
["#5 [linearChartId] fired "error" event. #25081850 …e FusionCharts JS debugMode for more information."]
 192.168.8.39:17
["#6 [linearChartId] fired "internal.domelementcreated" event. "] 192.168.8.39:17
Uncaught RuntimeException: #25081850 linearChartId::RendererManager Error >> There was an error rendering the chart. Enable FusionCharts JS debugMode for more information. FusionCharts.js:15

 

Sample code replicating the problem is : 

<html>
	<head>
		<title> </title>
		<!-- <link type="text/css" rel="stylesheet" href=""/>
		<script src="../extjs/ext-all.js"></script> -->
		<script src="/FusionCharts/scripts/FusionCharts.js"></script>
	</head>

	<body> 
		<div id="container"></div>
		<script>
			var anotherXml = "<chart lowerLimit='0' upperLimit='100' lowerLimitDisplay='Bad' upperLimitDisplay='Good' palette='1' numberSuffix='%' chartRightMargin='20'><colorRange><color minValue='0' maxValue='75' code='FF654F' label='Bad'/><color minValue='75' maxValue='90' code='F6BD0F' label='Moderate'/><color minValue='90' maxValue='100' code='8BBA00' label='Good'/></colorRange><pointers><pointer value='92'/></pointers></chart>";
			var linearChart = new FusionCharts('/final/FusionCharts/swf/HLinearGauge.swf','linearChartId','100%','36','1','1');
			FusionCharts.setCurrentRenderer('javascript');
			FusionCharts.debugMode.enabled(true);
			FusionCharts.debugMode.outputTo(function(){
				console.log(arguments);
			});
			linearChart.setXMLData(anotherXml);
			linearChart.setTransparent(true);
			linearChart.render('container');
		</script>
	</body>
</html>

 

EDIT:

 

It says :

 

GET http://192.168.8.39:7077/final/FusionCharts/Charts/FusionCharts.HC.Widgets.js 404 (Not Found) 

Any help?

 

Regards,

Premkumar. A

Edited by a.premkumar

Share this post


Link to post
Share on other sites

Hello,

 

       I am trying to load a Linear Gauge chart in my application. I have done it with the div and render methodology. It is working fine when flash is enabled. But when I check loading the chart after disabling flash, I get some error from FusionChart.js

 

Please I need to solve this as soon as possible. I have given the required details below.

 

Version being used : 3.2.1

 

Error log: 

["#3 [linearChartId] fired "beforedataupdate" event. "] 192.168.8.39:17
["#4 [linearChartId] fired "dataupdated" event. "] 192.168.8.39:17
["#5 [linearChartId] fired "error" event. #25081850 …e FusionCharts JS debugMode for more information."]
 192.168.8.39:17
["#6 [linearChartId] fired "internal.domelementcreated" event. "] 192.168.8.39:17
Uncaught RuntimeException: #25081850 linearChartId::RendererManager Error >> There was an error rendering the chart. Enable FusionCharts JS debugMode for more information. FusionCharts.js:15

 

Sample code replicating the problem is : 

<html>
	<head>
		<title> </title>
		<!-- <link type="text/css" rel="stylesheet" href=""/>
		<script src="../extjs/ext-all.js"></script> -->
		<script src="/FusionCharts/scripts/FusionCharts.js"></script>
	</head>

	<body> 
		<div id="container"></div>
		<script>
			var anotherXml = "<chart lowerLimit='0' upperLimit='100' lowerLimitDisplay='Bad' upperLimitDisplay='Good' palette='1' numberSuffix='%' chartRightMargin='20'><colorRange><color minValue='0' maxValue='75' code='FF654F' label='Bad'/><color minValue='75' maxValue='90' code='F6BD0F' label='Moderate'/><color minValue='90' maxValue='100' code='8BBA00' label='Good'/></colorRange><pointers><pointer value='92'/></pointers></chart>";
			var linearChart = new FusionCharts('/final/FusionCharts/swf/HLinearGauge.swf','linearChartId','100%','36','1','1');
			FusionCharts.setCurrentRenderer('javascript');
			FusionCharts.debugMode.enabled(true);
			FusionCharts.debugMode.outputTo(function(){
				console.log(arguments);
			});
			linearChart.setXMLData(anotherXml);
			linearChart.setTransparent(true);
			linearChart.render('container');
		</script>
	</body>
</html>

 

EDIT:

 

It says :

 

GET http://192.168.8.39:7077/final/FusionCharts/Charts/FusionCharts.HC.Widgets.js 404 (Not Found) 

Any help?

 

Regards,

Premkumar. A

Hi,

 

Could you please try keeping "FusionCharts.HC.js", "FusionCharts.HC.Widgets.js" and "jquery.min.js" in the same folder as "FusionCharts.js" from the "Charts" folder of the FusionWidgets XT download package, while rendering the gauges in JavaScript mode and see if this helps?

Ref.- http://docs.fusioncharts.com/widgets/Contents/?FirstChart/UsingPureJS.html

 

Hope this helps. :)

Share this post


Link to post
Share on other sites

Hi Sanjukta,

 

Thank you for the response. I did as you directed. Now the charts show a label 'Loading Chart, Please wait...'. At this point another script error is shown in the console. I am pasting it here in case it may be helpful in finding the cause.

 

 

  1. Uncaught TypeError: Cannot read property 'callbacks' of undefined FusionCharts.HC.Widgets.js:40
     

Does this mean anything that I have done wrong while configuring chart?

 

Regards,

Premkumar.

Share this post


Link to post
Share on other sites

Hello Sanjukta,

 

            The problem has been resolved. I was missing some files or something in my FusionChart folder. So I downloaded the HLinearGauge sample provided here in another thread and applied the FusionChart files to my code. It worked. Thank you for the help.

 

Regards,

Premkumar. A

Share this post


Link to post
Share on other sites

Hello Sanjukta,

 

            The problem has been resolved. I was missing some files or something in my FusionChart folder. So I downloaded the HLinearGauge sample provided here in another thread and applied the FusionChart files to my code. It worked. Thank you for the help.

 

Regards,

Premkumar. A

Hey,

 

Glad that your issue is resolved.

 

Happy FusionCharting! :)

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