FusionCharts Support

getting the scatter plot to work using PHP Class

Recommended Posts

I've been working with the BasicDBExample.php file in the PHP Class folder and I can successfully draw data from my database and draw most charts. But I can't get it to work with the Scatter.swf chart. The data I'm pulling are two fields, each with numbers in them. The line below, from the example file, passes those values to the chart:

 

 

 

$FC->addDataFromDatabase($result, "engel", "peter");

 

 

 

The values in the engel and peter fields vary from zero to 12, all positive. When I run the page I can see the scatter chart, but no data is plotted--it's empty. If I change the chart spec to Pie3D.swf, or Bar2d.swf I get pie sections and bars to show up. I haven't been able to find any helpful tutorial for how to spec out a scatter chart properly.

 

 

 

Thanks in advance for any help given.

 

 

 

Jerry

Share this post


Link to post
Share on other sites

Are you saying that it's just this particular function (AddDatatoDatabase) that won't work with a scatter plot? If so, is there a way I could make use of the other functions and populate a scatter chart from a different angle?

 

 

 

Jerry

Share this post


Link to post
Share on other sites

I have further studied the FusionCharts_Gen.php file and it appears it has what it needs to populate a scatter graph, but I'm too new to this to clearly see what to do.

 

 

 

What function would I use in place of AddDataFromDatabase to generate the XML for a scatter plot? And what would the parameters be?

 

 

 

Thanks for any help.

 

 

 

Jerry

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