Sign in to follow this  
Guest Madhumita

"Chart." Before chart loads

Recommended Posts

When I call in the renderChart function in PHP, it creates a div with the text: "Chart." in the middle.

 

 

 

Is there a way to customize the HTML in the div before the chart renders?

 

 

 

Thank you,

 

Brian

Share this post


Link to post
Share on other sites
Guest Madhumita

Hi Brian,

You can achieve this by modifying the FusionCharts.PHP file.

Please refer to the code below(which starts from line 92 in  FusionCharts.PHP) :

<!-- START Script Block for Chart $chartId -->

 <div id="$chartIdDiv" align="center">

Chart.

 </div>

 <script type="text/javascript"> 

//Instantiate the Chart 

var chart_$chartId = new FusionCharts("$chartSWF", "$chartId", "$chartWidth", "$chartHeight", "$ndebugMode", "$nregisterWithJS");

  chart_$chartId.setTransparent("$nsetTransparent");

 

$tempData

//Finally, render the chart.

chart_$chartId.render("$chartIdDiv");

 </script> 

 <!-- END Script Block for Chart $chartId -->

 By changing the parameter passed in the align attribute of the above code you can customize the position of the chart.

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