欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

jQuery插件FusionCharts实现的3D帕累托图效果示例【附demo源码】

程序员文章站 2023-11-20 15:52:40
本文实例讲述了jquery插件fusioncharts实现的3d帕累托图效果。分享给大家供大家参考,具体如下: 1、设计3d帕累托图的页面 index.html:...

本文实例讲述了jquery插件fusioncharts实现的3d帕累托图效果。分享给大家供大家参考,具体如下:

1、设计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、设计3d帕累托图的数据源 pareto3d.xml:

<?xml version="1.0" encoding="utf-8"?>
<chart caption="(jb51.net)一周统计人数" xaxisname="星期" pyaxisname ="人数" 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、设计结果

jQuery插件FusionCharts实现的3D帕累托图效果示例【附demo源码】

附:完整实例代码点击此处本站下载

注:该源码需要放到服务器环境下运行!否则无法加载xml文件数据。

更多关于jquery相关内容感兴趣的读者可查看本站专题:《jquery常用插件及用法总结》、《jquery中ajax用法总结》、《jquery表格(table)操作技巧汇总》、《jquery扩展技巧总结》、《jquery常见经典特效汇总》及《jquery选择器用法总结

希望本文所述对大家jquery程序设计有所帮助。