首页  >  文章  >  web前端  >  jQuery插件FusionCharts绘制饼状图

jQuery插件FusionCharts绘制饼状图

php中世界最好的语言
php中世界最好的语言原创
2018-04-19 16:26:212518浏览

这次给大家带来jQuery插件FusionCharts绘制饼状图,jQuery插件FusionCharts绘制饼状图的注意事项有哪些,下面就是实战案例,一起来看一下。

1、了解帕累托图的特性以及和其他图的共性

2、设计帕累托图页面中引入图的类型以及怎么引入到页面

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 Pareto2D图</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 pareto2D = new FusionCharts( "FusionCharts/Pareto2D.swf", "pareto2DId", "100%", "540", "0" );
 pareto2D.setXMLUrl("pareto2D.xml");
 pareto2D.render("pareto2DChart");
});
</script>
</head>
<body>
  <p id="pareto2DChart"></p>
</body>
</html>


pareto2D.xml:3、设计帕累托图的数据源

<?xml version="1.0" encoding="UTF-8"?>
<chart caption="(jb51.net)一周统计人数" xAxisName="星期" PYAxisName ="人数" plotGradientColor="" showValues=&#39;0&#39;
    baseFont=&#39;微软雅黑&#39; baseFontSize=&#39;20&#39; baseFontColor=&#39;#654545&#39; outCnvBaseFont=&#39;宋体&#39;
    outCnvBaseFontSize=&#39;24&#39; outCnvBaseFontColor=&#39;#989899&#39; drawAnchors=&#39;1&#39; anchorSides=&#39;4&#39;
    anchorRadius=&#39;10&#39; anchorBorderColor=&#39;#FF0000&#39; anchorBorderThickness=&#39;1&#39; anchorBgColor=&#39;#00FF00&#39;
    anchorAlpha=&#39;50&#39; anchorBgAlpha=&#39;50&#39; numpLines=&#39;8&#39; pLineIsDashed=&#39;1&#39;>
  <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>

jQuery插件FusionCharts绘制的2D帕累托图效果示例【附demo源码】

相信看了本文案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!

推荐阅读:

jQuery实现单行公告轮播

jquery插件扩展使用详解

jQuery判断浏览器版本的方法

以上是jQuery插件FusionCharts绘制饼状图的详细内容。更多信息请关注PHP中文网其他相关文章!

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn