Rama Rao

Fc_Chartupdated Is Not Called In Hlinear Guage Update

Recommended Posts

Hi all,

I am trying to display and update HLINEAR GUAGE fusionGadget pointer value. When I am dragging the pointer , the function FC_ChartUpdated is not being called. I have tried using RealtimeUpdateComplete eventListener too. But it displays error 'Object does not support property / method 'setAttribute''..Can you please tell me the reason?

 

Here is my code,

 



<html>
<head>
<title>FusionGadgets</title>
<script language="JavaScript" src="FusionCharts.js"></script>      
</head>
<body bgcolor="#ffffff">
  <div id="chartdiv" align="center">FusionGadgets</div>

  <script type="text/javascript">
var myChart = new FusionCharts("HLinearGauge.swf", "myChartId", "450", "120", "0", "0");
myChart.setDataURL("Data.xml");
myChart.render("chartdiv");
  </script> 

</body>
<script>

FusionCharts("myChartId").addEventListener("RealtimeUpdateComplete" , myChartListener);
function myChartListener(){
alert('Hi.');
}

 function FC_Rendered(DOMId)
 	{  //alert(Math.round(pointerValue));    
        //Check if DOMId is that of the chart we want
            	if (DOMId=="myChartId"){
              	//Get reference to the chart
              	var chartRef = FusionCharts(DOMId);
              	//Get the current value
              	var pointerValue = chartRef.getData(1); 
              	//You can also use getDataForId method as commented below, to get the pointer value.
              	//var pointerValue = chartRef.getDataForId("CS"); 
              	//Update display
                 alert(Math.round(pointerValue));    
		     }

 	}
</script>
</html>

Share this post


Link to post
Share on other sites

Hi,

I am getting javascript error here.....

var chartReference = FusionCharts("myChartId"); // Object does not support property / method 'setAttribute''

If I am trying to get the reference form the follow way,

var chartRef = FusionCharts.items['myChartId'];

..getting another error 'Unable to property /'method 'myChartId': Object is null or undefined

 

 

Hi all,

I am trying to display and update HLINEAR GUAGE fusionGadget pointer value. When I am dragging the pointer , the function FC_ChartUpdated is not being called. I have tried using RealtimeUpdateComplete eventListener too. But it displays error 'Object does not support property / method 'setAttribute''..Can you please tell me the reason?

 

Here is my code,

 



<html>
<head>
<title>FusionGadgets</title>
<script language="JavaScript" src="FusionCharts.js"></script>      
</head>
<body bgcolor="#ffffff">
  <div id="chartdiv" align="center">FusionGadgets</div>

  <script type="text/javascript">
var myChart = new FusionCharts("HLinearGauge.swf", "myChartId", "450", "120", "0", "0");
myChart.setDataURL("Data.xml");
myChart.render("chartdiv");
  </script> 

</body>
<script>

FusionCharts("myChartId").addEventListener("RealtimeUpdateComplete" , myChartListener);
function myChartListener(){
alert('Hi.');
}

 function FC_Rendered(DOMId)
 	{  //alert(Math.round(pointerValue));    
    	//Check if DOMId is that of the chart we want
        		if (DOMId=="myChartId"){
          		//Get reference to the chart
          		var chartRef = FusionCharts(DOMId);
          		//Get the current value
          		var pointerValue = chartRef.getData(1); 
          		//You can also use getDataForId method as commented below, to get the pointer value.
          		//var pointerValue = chartRef.getDataForId("CS"); 
          		//Update display
                 alert(Math.round(pointerValue));    
	         }

 	}
</script>
</html>

Share this post


Link to post
Share on other sites

Hi Guys,

Finally,After had been working for several hours,this issue has been resolved.These are the steps which made the issue was resolved...

( By hoping this wil help others who is(will be) suffering from the same issue ).

 

  1. Passing registerWithJs value '1'.
  2. var myChart1 = new FusionCharts("HLinearGauge.swf", "myChartId1", "450", "105", "0", "1");
  3. Changed Flash Player Global Security Settings..for more info For more info
  4. Chang the FusionCharts.js file to new version.
  5. After had made these changes,I encountered with new issue, chartRef.getData(1) gives javascript error (Object does not support the property/method).

So then I changed the code for getting chart reference to var chartRef = getChartFromId(DOMId); from var chartRef = FusionCharts(DOMId);

Edited by Rama Rao

Share this post


Link to post
Share on other sites
Guest Sumedh

Hi Rama, smile.gif

 

We appreciate your efforts.smile.gif

 

And thanks a lot for posting important stuff.tongue.gif

 

This will surely help everyone.

 

Hope you have a great day.smile.gif

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