Highcharts 圆饼图demo

[img]http://dl2.iteye.com/upload/attachment/0123/3924/188da3da-af02-3f19-85b8-6d7f1a4c7af4.jpg[/img]


<div id="container" style="width: 600px; height: 550px; margin: 0 auto"></div>
<script language="JavaScript">
var beginTime = "2016年12月06日 16:54";
var endTime = "2017年01月06日 16:54";
$(document).ready(function() {
var chart = {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
};
var title = {
text: beginTime+' ~ '+endTime
};
//鼠标显示
var tooltip = {
pointFormat: '{series.name}: <b>{point.y}</b><br/>总调用次数:{point.total}'
};
//饼图外显示
var plotOptions = {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format: '<b>{point.name}</b>: {point.percentage:.1f}%'
},
showInLegend: true
}
};
var series= [{
type: 'pie',
name: '调用次数',
data: [
{
name: "逾期平台查询",
y: 100
},
{
name: "人脸比对",
y: 20
},
{
name: "银行帐号认证",
y: 300
},
{
name: "法院公告详情",
y: 4
},
{
name: "名片识别",
y: 50
},
{
name: "营业执照识别",
y: 6
}
]
}];

var json = {};
json.chart = chart;
json.title = title;
json.tooltip = tooltip;
json.series = series;
json.plotOptions = plotOptions;
$('#container').highcharts(json);
});
</script>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值