码迷,mamicode.com
首页 > 其他好文 > 详细

玩转highcharts甜圈图

时间:2014-05-21 18:49:23      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:style   c   java   tar   ext   http   

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Highcharts Example</title>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$(‘#container‘).highcharts({
chart: {
plotBackgroundColor: ‘red‘,
backgroundColor:‘black‘,
spacingRight: 300,
plotShadow: false
},
title: {
text: ‘Browser<br>shares‘,
align: ‘center‘,
verticalAlign: ‘middle‘,
y: 10
},
tooltip: {
pointFormat: ‘{series.name}: <b>{point.percentage:.1f}%</b>‘
},
credits: {
enabled: false
},
plotOptions: {
pie: {
dataLabels: {
enabled: true,
//distance: -50,
style: {
fontSize:‘3px‘,
color: ‘white‘,
textShadow: ‘0px 1px 2px black‘
}
},
startAngle: -90,
endAngle: 270,
center: [‘50%‘, ‘55%‘]
}
},
series: [{
type: ‘pie‘,
name: ‘Browser share‘,
innerSize: ‘40%‘,
data: [
[‘Firefox‘, 45.0],
[‘IE‘, 26.8],
[‘Chrome‘, 12.8],
[‘Safari‘, 8.5],
[‘Opera‘, 6.2],
{
name: ‘Others‘,
y: 0.7,
dataLabels: {
enabled: false
}
}
]
}]
});
});

</script>
</head>
<body>
<script src="../../js/highcharts.js"></script>
<script src="../../js/modules/exporting.js"></script>

<div id="container" style="min-width: 310px; height: 300px; max-width: 600px; margin: 0 auto;"></div>

</body>
</html>

玩转highcharts甜圈图,布布扣,bubuko.com

玩转highcharts甜圈图

标签:style   c   java   tar   ext   http   

原文地址:http://www.cnblogs.com/hk88/p/3740230.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!