ananrv Report post Posted October 25, 2007 Hi, I have using more then one Pie charts using in single PHP page .It is working in firefox nice but in IE only one chart is displayed ather places there written in chart tect i have given in different names in chart please check the below code $strXML = ""; $realanswer = mysql_query("select * from realanswer where qid =1"); $j=1; while($resultanswer = mysql_fetch_array($realanswer)){ $valw = $resultanswer['answer']; $valo = @$resultanswer['order']; $val = trim($valw); $ans = mysql_query("select * from question where q1 = $j"); $k = mysql_num_rows($ans); if($j==1){$rand = "E4EAFF";} if($j==2){$rand = "FFD6FC";} if($j==3){$rand = "CFFBFF";} if($j==4){$rand = "FFDFD2";} if($j==5){$rand = "D1F4EA";} if($j==6){$rand = "FFD2D7";} if($j==7){$rand = "EAF5BB";} $strXML .= ""; $j++; } $strXML .= ""; echo renderChart("FusionCharts/FCF_Pie3D.swf", "", $strXML, "FactorySum", 300, 276, false, false); ?> <?php $strXML1 = ""; $realanswer = mysql_query("select * from realanswer where qid =2"); $j=1; while($resultanswer = mysql_fetch_array($realanswer)){ $valw = $resultanswer['answer']; $valo = @$resultanswer['order']; $val = trim($valw); $ans = mysql_query("select * from question where q2 = $j"); $k = mysql_num_rows($ans); if($j==1){$rand = "E4EAFF";} if($j==2){$rand = "FFD6FC";} if($j==3){$rand = "CFFBFF";} if($j==4){$rand = "FFDFD2";} if($j==5){$rand = "D1F4EA";} if($j==6){$rand = "FFD2D7";} if($j==7){$rand = "EAF5BB";} $strXML1 .= ""; $j++; } $strXML1 .= ""; echo renderChart("FusionCharts/FCF_Pie3D.swf", "", $strXML1, "FactorySum", 300, 276, false, false); how to solve this Share this post Link to post Share on other sites
ananrv Report post Posted October 25, 2007 sorry correct code is $strXML = ""; $realanswer = mysql_query("select * from realanswer where qid =1"); $j=1; while($resultanswer = mysql_fetch_array($realanswer)){ $valw = $resultanswer['answer']; $valo = @$resultanswer['order']; $val = trim($valw); $ans = mysql_query("select * from question where q1 = $j"); $k = mysql_num_rows($ans); if($j==1){$rand = "E4EAFF";} if($j==2){$rand = "FFD6FC";} if($j==3){$rand = "CFFBFF";} if($j==4){$rand = "FFDFD2";} if($j==5){$rand = "D1F4EA";} if($j==6){$rand = "FFD2D7";} if($j==7){$rand = "EAF5BB";} $strXML .= ""; $j++; } $strXML .= ""; echo renderChart("FusionCharts/FCF_Pie3D.swf", "", $strXML, "FactorySum", 300, 276, false, false); ?> <?php $strXML1 = ""; $realanswer = mysql_query("select * from realanswer where qid =2"); $j=1; while($resultanswer = mysql_fetch_array($realanswer)){ $valw = $resultanswer['answer']; $valo = @$resultanswer['order']; $val = trim($valw); $ans = mysql_query("select * from question where q2 = $j"); $k = mysql_num_rows($ans); if($j==1){$rand = "E4EAFF";} if($j==2){$rand = "FFD6FC";} if($j==3){$rand = "CFFBFF";} if($j==4){$rand = "FFDFD2";} if($j==5){$rand = "D1F4EA";} if($j==6){$rand = "FFD2D7";} if($j==7){$rand = "EAF5BB";} $strXML1 .= ""; $j++; } $strXML1 .= ""; echo renderChart("FusionCharts/FCF_Pie3D.swf", "", $strXML1, "FactorySum", 300, 276, false, false); Share this post Link to post Share on other sites
Pallav Report post Posted October 30, 2007 Hi, Can you make sure that you're allotting a different DIV and ID to each chart, as explained at http://www.fusioncharts.com/gadgets/docs/Contents/MultiCharts.html? Share this post Link to post Share on other sites