highcharts饼状图百分比显示的数据和写的不同

hi![图片描述][1]ghcharts饼状图百分比显示的数据和写的不同`图片描述`
<html>
<head>
<title>Highcharts Tutorial</title>
<meta charset="utf-8">
   <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
 <script src="http://code.highcharts.com/highcharts.js"></script>
</head>
<body>
<div id="abattoir" style="width: 360px; height: 150px; margin: 0 auto"></div>
<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Highcharts Example</title>
 
      
       
    </head>
    <body>
        
        <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
         <script type="text/javascript">
            $(function () {
                $('#container').highcharts({
                    credits:{
                           enabled:false
                        },
                        

                    chart: {
                        plotBackgroundColor: null,
                        plotBorderWidth: null,
                        plotShadow: false
                    },
                    colors:[
                        'red',
                        'blue',
                        '#bae9ff',
                       
                      ],
                    title: {
                        text: false
                    },
                    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:.2f} %'
                            }
                        }
                    },
                    series: [{
                        type: 'pie',
                        name: 'B',
                        data: [
                            ['Firefox',   45.0],
                            ['IE',       25.8],
                            ['sdvsd',      5.49],
                        ]
                    }]
                });
            });
        </script>

    </body>
</html>
</script>
</body>
</html>
阅读 5.2k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题