Vedmack

Using new API constractor

Recommended Posts

Hi, 

 

Until recently I was using the "old" style API initialization, like this:

			chartReference = new FusionCharts("Pie2D", "os_chart_id", placeHolderWidth, placeHolderHeight, "0", "0");
			chartReference.setJSONData(chartData);
			chartReference.setTransparent(true);
			chartReference.render("os_kpi_container");

Now I want to use the new one (I downloaded the latest js files)

			chartReference = new FusionCharts({
			        type: 'pie2d',
				renderAt: 'os_chart_id',
				width: placeHolderWidth,
				height: placeHolderHeight,
				dataFormat: 'json',
				dataSource: chartData
				});

			chartReference.setTransparent(true);
			chartReference.render("os_kpi_container");

BUT, it generates a slightly bigger pie chart and while it is doing the animation its even bigger (while the animation is being animated) which add a vertical scroll to my page (because the pie chart is located near the bottom of the screen)

 

What am I missing ? How I put the "0", "0" that I did set in the old API 

 

Thanks ahead!

 

Daniel.

Share this post


Link to post
Share on other sites

Hi, 

 

Until recently I was using the "old" style API initialization, like this:

			chartReference = new FusionCharts("Pie2D", "os_chart_id", placeHolderWidth, placeHolderHeight, "0", "0");
			chartReference.setJSONData(chartData);
			chartReference.setTransparent(true);
			chartReference.render("os_kpi_container");

Now I want to use the new one (I downloaded the latest js files)

			chartReference = new FusionCharts({
			        type: 'pie2d',
				renderAt: 'os_chart_id',
				width: placeHolderWidth,
				height: placeHolderHeight,
				dataFormat: 'json',
				dataSource: chartData
				});

			chartReference.setTransparent(true);
			chartReference.render("os_kpi_container");

BUT, it generates a slightly bigger pie chart and while it is doing the animation its even bigger (while the animation is being animated) which add a vertical scroll to my page (because the pie chart is located near the bottom of the screen)

 

What am I missing ? How I put the "0", "0" that I did set in the old API 

 

Thanks ahead!

 

Daniel.

Hi Daniel,

 

Please note that the 0, 0 that you had referred to are actually the Boolean values for the debug mode and the registerwithJS parameter.

 

Debugmode is not required anymore as the latest version does not support Flash any further and "registerwithJS" is always set to 1 by default in the latest version.

 

Please send us your complete sample so that we might test it? Also, you can fix the "pieRadius" value so as to keep the pie size constant.

 

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