本文實例講述了jQuery插件FusionCharts實現(xiàn)的3D帕累托圖效果。分享給大家供大家參考,具體如下:
1、設(shè)計3D帕累托圖的頁面
index.html:
<!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>FusionCharts Pareto3D圖</title><script type="text/javascript" src="jquery-1.7.2.min.js"></script><script type="text/javascript" src="FusionCharts/FusionCharts.js"></script><script type="text/javascript">$(function(){ var pareto3D = new FusionCharts( "FusionCharts/Pareto3D.swf", "pareto3DId", "100%", "540", "0" ); pareto3D.setXMLUrl("pareto3D.xml"); pareto3D.render("pareto3DChart");});</script></head><body> <div id="pareto3DChart"></div></body></html>2、設(shè)計3D帕累托圖的數(shù)據(jù)源 pareto3D.xml:
<?xml version="1.0" encoding="UTF-8"?><chart caption="(VeVB.COm)一周統(tǒng)計人數(shù)" xAxisName="星期" PYAxisName ="人數(shù)" plotGradientColor="" showValues='0' baseFont='微軟雅黑' baseFontSize='20' baseFontColor='#654545' outCnvBaseFont='宋體' outCnvBaseFontSize='24' outCnvBaseFontColor='#989899' drawAnchors='1' anchorSides='4' anchorRadius='10' anchorBorderColor='#FF0000' anchorBorderThickness='1' anchorBgColor='#00FF00' anchorAlpha='50' anchorBgAlpha='50' numDivLines='8' divLineIsDashed='1'> <set label="星期一" value="205"/> <set label="星期二" value="165"/> <set label="星期三" value="85"/> <set label="星期四" value="62"/> <set label="星期五" value="73"/> <set label="星期六" value="109"/> <set label="星期日" value="121"/></chart>
3、設(shè)計結(jié)果

附:完整實例代碼點擊此處本站下載。
注:該源碼需要放到服務(wù)器環(huán)境下運(yùn)行!否則無法加載xml文件數(shù)據(jù)。
更多關(guān)于jQuery相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《jQuery常用插件及用法總結(jié)》、《jquery中Ajax用法總結(jié)》、《jQuery表格(table)操作技巧匯總》、《jQuery擴(kuò)展技巧總結(jié)》、《jQuery常見經(jīng)典特效匯總》及《jquery選擇器用法總結(jié)》
希望本文所述對大家jQuery程序設(shè)計有所幫助。
新聞熱點
疑難解答