JSP fusioncharts free display diagram specific implementation

Source: Internet
Author: User

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" >


<html>


<head>


<base href= "<%=basePath%>" >





<title>Demo</title>


<script type= "Text/javascript" src= "Fusionchartsfree/jsclass/fusioncharts.js" ></script>


</head>





<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>


</html>


Display effect:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.