<script>//Generate Fushioncharts function Showchart (charttype,showdiv,data) { var mychart1= new Fusioncharts ("<%=request.getcontextpath ()%>/framework/fusioncharts/" +charttype+ ". swf? Chartnodatatext= currently has no data to display graphics ", " MyChartId1 "," 100% "," 100% "," 0 "," 0 ", mychart1.setdataxml (data); Mychart1.settransparent (True); Mychart1.render (Showdiv); } $ (document). Ready (function () {var resultxml=$ ("#resultXml"). Val (); Showchart (CharType, "Div1", Resultxml);}); </script>
In the previous notation, I was always in $ (document). Ready (), add fusioncharts, that is, the page load after loading fusioncharts, but often there is a problem, that is, the report graphics squeezed together, the display effect is not displayed, If it is resolved, the solution is to follow the <script> directly behind the Div, and no longer in $ (document). Ready page load after loading fusioncharts can solve the problem
<table width= "100%" height= "100%" border= "1" > <tr> <td width= "65%" height= "50 % "> <div id=" Div1 "></div> <!--Business Type-- <script type=" Text/javascript "> var mychart1= new Fusioncharts ("<%=request.getcontextpath ()%>/framework/fusioncharts/${property.chartstyle}". Swf? Chartnodatatext= currently has no data to display graphics ", " MyChartId1 "," 100% "," 100% "," 0 "," 0 "), Mychart1.setdataxml (" ${ Property.resultxml} "); Mychart1.settransparent (true); Mychart1.render (" Div1 "); </script> </td>
Solve the problem that the Fusioncharts display is not complete, often squeeze together