Fusioncharts free Download Address: http://www.fusioncharts.com/goodies/fusioncharts-free/
Next in the JSP page to introduce JS
Copy Code code as follows:
<script type= "Text/javascript" src= "Fusionchartsfree/jsclass/fusioncharts.js" ></script>
And then write
Copy Code code as follows:
<script type= "Text/javascript" >
var chart = new Fusioncharts ("fusionchartsfree/charts/fcf_column3d.swf", "Column1", "800", "600");
Chart.setdataurl ("Fusionchartsfree/gallery/data/column3d.xml");
Chart.render ("Div1");
</script>
The second row of the parameters are: to display the graphics of the SWF address, graphics ID (can be arbitrary, but a page has more than one graphic is unique), the width of the graph, the height of the graph;
The third line is to set the address to display the data XML;
Line four is the render graph parameter is the div ID;
Report:
Copy Code code as follows:
<%@ page language= "java" import= "java.util.*" pageencoding= "GBK"%>
<%
String path = Request.getcontextpath ();
String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";
%>
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
<base href= "<%=basePath%>" >
<title>Demo</title>
<script type= "Text/javascript" src= "Fusionchartsfree/jsclass/fusioncharts.js" ></script>
<body>
<div id= "Div1" ></div>
<script type= "Text/javascript" >
var chart = new Fusioncharts ("fusionchartsfree/charts/fcf_column3d.swf", "Column1", "800", "600");
Chart.setdataurl ("Fusionchartsfree/gallery/data/column3d.xml");
Chart.render ("Div1");
</script>
</body>
Display effect: