Sign in to follow this  
mysticBoer

Zoom In/Out function not working right

Recommended Posts

Ok, since a chart is basically a flash movie, I'm trying to implement the flash zoom functionality using the following JavaScript:

 


               function ZoominFlashMovie()

	{

		var flashMovie=getFlashMovieObject("ChartId");

		flashMovie.Zoom(90);

	}



	function ZoomoutFlashMovie()

	{

		var flashMovie=getFlashMovieObject("ChartId");

		flashMovie.Zoom(110);

	}



	function getFlashMovieObject(movieName)

	{

	  if (window.document[movieName]) 

	  {

	    return window.document[movieName];

	  }

	  if (navigator.appName.indexOf("Microsoft Internet")==-1)

	  {

	    if (document.embeds && document.embeds[movieName])

	      return document.embeds[movieName]; 

	  }

	  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)

	  {

	    return document.getElementById(movieName);

	  }

 

 

 

 

 

The 'Zoom In' functionality works fine, and I get the desired result. When I use the 'Zoom Out' functionality however, it does not zoom out the full extent. It stops at the second zoom level - as shown in the attachments.

 

 

 

Attachments:

 

Step 1 - The way the chart is initially loaded

 

Step 2 - After zooming in once or twice

 

Step 3 - After repeatedly clicking the zoom out button

 

 

 

This also happens if I apply the functionality on the FusionCharts samples...

 

 

 

Any ideas?

post-2235-128441566525_thumb.jpg

post-2235-12844156656_thumb.jpg

post-2235-128441566588_thumb.jpg

Share this post


Link to post
Share on other sites

The zoom that you're using here is actually zooming the entire Flash movie (from Adobe Flash Player API) - as such it's not controlled by FusionCharts.

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