Sign in to follow this  
S00

Help for Multiple Chart

Recommended Posts

Hi,

 

I am new member and I have a project which require to display a table (in PHP) populated by a

MySQL database and that need to generate graphs

(I succeeded to display the graphs by using FusionCharts).

 

Now , the problem is as follows : 

 

I have a select tag which contains a lot of options (5 at this day), and the goal of the project

is to enable multiple selection (2,3,4 ... options can be selected) and multiple graph display (surface area graphs).

For one option selected, no problem. For 2 or more, the graph displayed by the browser

is the one for the last selected option (and not all graphs for all selected options.).

So, I wonder where is the problem ? When I try to select multiple option with images , it works, but when I replace the images by the FusionCharts program, it not working. Why ? (I am using a classical foreach loop to catch the selected option and after, I call a php function which display the table results and the surface area graph)

 

 

Best regards, 

 

 

S00

post-68088-0-53900400-1446724701_thumb.png

Share this post


Link to post
Share on other sites

Hi, 

 

 

You will find in attachment the results displayed in my browser. 

 

One picture describes the result by using images, the other one shows the results by using FusionCharts.

 

As you can see in the dynamic results (picture with FuSionCharts), the problem is that there is only one 

 

graph that is displayed.

 

I checked the source code and I think that the problem comes from the "renderAt" property (of the surface area),

 

because it use an id for rendering the wanted charts in a <div> tag, which is the container.

 

My question is : is it possible to apply "class" instead of 'id' in <div>

 

container in order to solve that issue ? If no, is there anything else that I can do,

 

because I need to solve this problem as quick as possible ?

 

 

 

Best regards,

 

 

S00.

 

post-68088-0-93121500-1446803743_thumb.png

post-68088-0-64646500-1446803745_thumb.png

Share this post


Link to post
Share on other sites

Hi, 

 

 

I finally solved the problem : 

 

I used a php name for the instanciation of the fusionCharts constructor and

I added an id in the constructor's arguments (type, id, renderAt, width, height, dataFormat, etc ...).

I deleted the " window.onload = function() " instruction and I used only  the " FusionCharts.ready " instruction.

In the <div> tag container, I put the same php name I used for the FusionCharts instanciation (<div id = '<?php echo $xyz; ?>' >).

It looks fine(cf. Thumbnails).

 

 

Thank you for having tried to help me.

 

 

Best regards, 

 

 

S00.

 

 

 

 

 

 

post-68088-0-42369100-1447066366_thumb.png

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