深海的小鱼儿

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

源代码:

备注:前面的没有用的代码省~

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>深海的小鱼编制-PLOT</title>
<script language="javascript"  type="text/javascript" src="jquery.js"></script>
<script language="javascript" type="text/javascript" src="jquery.flot.js"></script>
<script language="javascript" type="text/javascript" src="jquery.flot.pie.js"></script>
<style type="text/css">
#apDiv1 {
    position:absolute;
    width:600px;
    height:300px;
    z-index:1;
    left: 200px;
    top: 167px;
}
</style>
</head>

<body>
<h1>深海的小鱼儿--饼图</h1>
<div id="apDiv1" align="center"></div>
<script type="text/javascript">
$(function(){
    var data = [
        { label: "Series1",  data: 35},
        { label: "Series2",  data: 30},
        { label: "Series3",  data: 60},
        { label: "Series4",  data: 70},
        { label: "Series5",  data: 80},
        { label: "Series6",  data: 50}
    ];
    $.plot($("#apDiv1"), data,
    {
        series: {
            pie: { show: true}
                }
    });
});
</script>
</body>
</html>

图解:

2011-4-3-16-16

posted on 2011-04-03 16:15  深海的小鱼儿  阅读(1758)  评论(0编辑  收藏  举报