Sign in to follow this  
rtibmx

How to render a chart in specific DIV with PHP class?

Recommended Posts

Originally I was not using the PHP wrapper class for FusionChart. Instead I was just writing the HTML and JS myself. With this technique I could call render(xxx) on the FusionChart JS class and specify the Id of the DIV that I wanted the chart to occupy. For example:

 

var chart = new FusionCharts(...);

 

chart.render("myDIVtoPutChartIn");

 

 

 

However, I have switched over to using the FusionCharts_Gen.php class. With this approach, how can I tell FusionCharts to place the chart inside myDIVtoPutChartIn like I did with the other approach? There is no mention of this in the documentation, and a glance at the PHP class does not reveal anything obvious. Even the PHP class renderChart() function does not take such a parameter.

 

 

 

Surely it must still be possible to specify the DIV where we want the chart to reside when using the PHP class? Can someone please let me know? Thanks!

Share this post


Link to post
Share on other sites

hi rtibmx,

 

 

 

please use attached FusionCharts_Gen.php page.

 

part of the sample code may like below

 

$FC->renderChart(false,false,'myDIVtoPutChartIn');

 

where myDIVtoPutChartIn is the given div id

 

 

 

@crunkmasterB: Hope this help you too.

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