ddebord

Multiple Charts on one ASP page

Recommended Posts

Hi,

I have a web application that needs to display a chart with data from every row of a returned recordset.  I have the web page set up to loop through and create a chart for each set of data until the recordset is EOF.  The page generates without any errors and all of the XML is correct for each chart, but the page will only generate one chart.  It only generates a chart for the last row in my recordset.

Any ideas on why this happens?

Thanks

D

Share this post


Link to post
Share on other sites

Uploaded three files for you.

aspcode.txt shows the looping structure used to generate the xml and display the chart.

chartoutput.jpg shows what the web browser displays

renderedhtml.txt shows the source of the page displayed in chartoutput.jpg.

 

There doesn't seem to be anything wrong with the XML that I can see?  But as you can see from the output it is only generating the last chart from the looping structure, which happens to be the last row returning from the recordset.

Thanks again for the reply.  I hope this helps

D

aspcode.txt

post-145-128441563628_thumb.jpg

rendered_html.txt

Share this post


Link to post
Share on other sites

You're using the same chartId, chart variable Id, Div ID for all the charts in the page. See below (bold):

var chart_FactorySum = new FusionCharts("FusionCharts/line.swf", "FactorySum", "800", "600", "0", "0");

Each chart in the page needs to have a different one.

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