Mutiple Charts on a single page
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Mutiple Charts on a single page Expand / Collapse
Author
Message
Posted 10/25/2007 3:13:00 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: Today @ 10:01:16 AM
Posts: 8, Visits: 16
Trying to build a single page with mutiple charts on the page. I can get the first one to post but receive an invalid XML message with chart #2

The charts work fine individaully so I'm fairly confident it's how I'm calling out the second chart.

The code is as follows:

<%
 
  
 
 Dim oRs, oRs2, strQuery
 Dim strXML
 
 
 Set oRs = Server.CreateObject("ADODB.Recordset")

 
 
 
 strXML = "<chart caption='Telephone Service Factor In Percentage' pieSliceDepth='30' showBorder='1' formatNumberScale='0'>"
 

 strQuery = "select * from Queue_Master_TSF"
 Set oRs = oConn.Execute(strQuery)
 
 While Not oRs.Eof
  
  Set oRs2 = Server.CreateObject("ADODB.Recordset")
  strQuery = "select sum(Quantity) as TotOutput from Queue_Output_TSF where GraphlabelID=" & ors("GraphlabelID")
  Set oRs2 = oConn.Execute(strQuery)    
   
  strXML = strXML & "<set label='" & ors("QueueName") & "' value='" & ors2("TotOutput") & "' />"
  
  Set oRs2 = Nothing
  oRs.MoveNext
 Wend
 
 strXML = strXML & "</chart>"
 Set oRs = nothing
 

 Call renderChart("../../FusionCharts/column3D.swf", "", strXML, "FactorySum", 850, 170, false, false)
 
  strQuery = "select * from Queue_Master_ABDN"
 Set oRs = oConn.Execute(strQuery)
 
 While Not oRs.Eof
  
  Set oRs2 = Server.CreateObject("ADODB.Recordset")
  strQuery = "select sum(Quantity) as TotOutput from Queue_Output_ABDN where GraphlabelID=" & ors("GraphlabelID")
  Set oRs2 = oConn.Execute(strQuery)    
   
  strXML = strXML & "<set label='" & ors("QueueName") & "' value='" & ors2("TotOutput") & "' />"
  
  Set oRs2 = Nothing
  oRs.MoveNext
 Wend
 
 strXML = strXML & "</chart>"
 Set oRs = nothing
 
 Call renderChart("../../FusionCharts/column3D.swf", "", strXML, "FactorySum1", 850, 170, false, false)
 
 
 
%>

Post #2860
Posted 10/30/2007 6:33:39 AM
FusionCharts Team

FusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts Team

Group: Administrators
Last Login: 7/29/2008 12:15:49 PM
Posts: 2,001, Visits: 474
Hi,

Can you switch the debug mode of both charts to on - that'll give you insights into what might be going wrong.


Thanks,
Pallav Nadhani
FusionCharts Team
Post #2889
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 7:02pm


Execution: 0.156.