1、数据源
Cylinder.xml:
<?xml version="1.0" encoding="UTF-8"?> <chart palette="4" lowerLimit="0" upperLimit="10000" numberSuffix=" ltrs." bgColor="FF0000" paletteThemeColor="669933" showTickMarks="1" ticksOnRight="0" majorTMNumber="10" minorTMNumber="1" adjustTM="0" tickValueStep="8" cylRadius="500"> <value>8954</value> <value>4512</value> </chart>
2、JSP页面
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>FusionWidgets Cylinder图</title> <script type="text/javascript" src="../Chart/JS/jquery-2.1.0.js"></script> <script type="text/javascript" src="../Chart/JS/FusionCharts.js"></script> <script type="text/javascript"> $(function(){ var cylinder = new FusionCharts( "../Chart/SWF/Cylinder.swf", "cylinderId", "100%", "550", "0" ); cylinder.setXMLUrl("xml/Cylinder.xml"); cylinder.render("cylinderDiv"); }); </script> </head> <body> <div id="cylinderDiv"></div> </body> </html>
3、运行结果