首页 > Web开发 > 详细

饼状图的js

时间:2015-11-20 19:12:29      阅读:198      评论:0      收藏:0      [点我收藏+]
<script type="text/javascript" src="http://cdn.hcharts.cn/jquery/jquery-1.8.3.min.js"></script>
  <script type="text/javascript" src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
  <script type="text/javascript" src="http://cdn.hcharts.cn/highcharts/exporting.js"></script>
 <script type="text/javascript">
                 $(function () {
    $(‘#container‘).highcharts({
        chart: {
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false
        },
        title: {
            text: ‘总用户数{$cou}‘
        },
        tooltip: {
             pointFormat: ‘{series.name}: <b>{point.percentage:.1f}%</b>‘
        },
        plotOptions: {
            pie: {
                allowPointSelect: true,
                cursor: ‘pointer‘,
                dataLabels: {
                    enabled: true,
                    color: ‘#000000‘,
                    connectorColor: ‘#000000‘,
                    format: ‘<b>{point.name}</b>: {point.percentage:.1f} %‘
                }
            }
        },
        series: [{
            type: ‘pie‘,
            name: ‘Browser share‘,
            data: [
                         <foreach name="b"  item="vo">
                                [‘{$vo.a}‘,   {$vo.b}],
                         </foreach>
            ]
        }]
    });
});              
          </script>

饼状图的js

原文:http://www.cnblogs.com/moshen/p/4981311.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!