Sign in to follow this  
AmyJohnson

Cannot get Entityrollover listener to work

Recommended Posts

Hello, I am using FusionMaps XT ver. 3.3.1 and trying to get the Entityrollover event  to register. Here is my code (copied from the example in documentation)

 

    <script type="text/javascript" src="fusion_charts/common_js/FusionCharts.js"></script>
        <script type="text/javascript" src="fusion_charts/common_js/jquery.min.js"></script>
  </head>   
  <body>
          <div id="details"> </div>     
    <div id="mapContainer">FusionMaps XT will load here!</div>          
    <script type="text/javascript"><!--         

      var myMap = new FusionCharts( "fusion_charts/FusionMaps/Maps/FCMap_World.swf", "myMapId", "400", "300", "0" );
      myMap.setXMLUrl("Data.xml");
      myMap.render("mapContainer");
                                        
      function myChartListener(eventObject, argumentsObject){
      alert ("in entity");
      }

      FusionCharts("myMapId").addEventListener ("EntityRollover" , myChartListener );

    // -->     
    </script>      
 

Here is my XML:

 

<map borderColor='005879' fillColor='D7F4FF' numberSuffix=' Mill.' includeValueInLabels='1' labelSepChar=': ' baseFontSize='9'>
 <data>
    <entity id='NA' value='515' />
    <entity id='SA' value='373' />
    <entity id='AS' value='3875' />
    <entity id='EU' value='727' />
    <entity id='AF' value='885' />
    <entity id='AU' value='32' />
 </data>
</map>
 

Thanks for any help

 

Share this post


Link to post
Share on other sites

Hi,

 

For Flash maps, please set 'exposeHoverEvent' attribute to 1 in <map> element of the XML.

 

If you are rendering the chart on a local system, update Flash Player Global Security settings to enable communication between charts and JavaScript in your local machine.

Ref-
http://docs.fusioncharts.com/charts/Tools/FlashPlayerSecuritySetup/HowToSetup.html

You can also resolve the issue by rendering the chart on the server.

 

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
Sign in to follow this