highcharts / pie.html
changxin's picture
Upload pie.html
626091b
raw
history blame
2.6 kB
<html>
<head>
<meta charset="utf-8"><link rel="icon" href="https://powerquery.anvil.app/_/theme/M.ico">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
</style>
<script src="https://powerquery.anvil.app/_/theme/highcharts.js"></script>
<script src="https://cdn.highcharts.com.cn/highcharts/modules/exporting.js"></script>
<script src="https://cdn.highcharts.com.cn/highcharts/modules/drilldown.js"></script>
<script src="https://powerquery.anvil.app/_/theme/highcharts-zh_CN.js"></script>
<script src="https://cdn.highcharts.com.cn/highcharts/themes/grid-light.js"></script>
</head>
<body>
<div id="music">
<audio controls="controls" autoplay="autoplay" loop=-1>
<source src="https://powerquery.anvil.app/_/theme/tougong.mp3" type="audio/mpeg" />
</audio>
</div>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
<script>
Highcharts.chart('container', {
chart: {type: 'pie'},
title: {text: '2013年11月产值贡献份额'},
subtitle: {text: '单击每个区域查看具体信息,数据来源: chuiniubi.com.'},
plotOptions: {series: {dataLabels: {enabled: true,format: '{point.name}: {point.y:.1f}%'}}},
tooltip: {
headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}%</b> of total<br/>'
},
series: [{name: '大中华区',colorByPoint: true,data: [
{name: '西安',y: 56.33,drilldown: '西安'},
{name: '北京',y: 24.03,drilldown: '北京'},
{name: '长沙',y: 10.38,drilldown: '长沙'},
{name: '成都',y: 4.77,drilldown: '成都'},
{name: '佛山',y: 0.91,drilldown: '佛山'}
]}],
drilldown: {series: [
{name: '西安',id: '西安',data: [['v11.0',24.13],['v8.0',17.2],['v9.0',8.11],[ 'v10.0',5.33],['v6.0',1.06],['v7.0',0.5]]},
{name: '北京',id: '北京',data: [[ 'v40.0',5],['v41.0',4.32],['v42.0',3.68],['v39.0',2.96]]},
{name: '长沙',id: '长沙',data: [['v35',2.76],['v36',2.32],['v37',2.31],['v34',1.27]]},
{name: '成都',id: '成都',data: [['v8.0',2.56],['v7.1',0.77],['v5.1',0.42]]},
{name: '佛山',id: '佛山',data: [['v12.x',0.34],['v28',0.24],['v27',0.17],['v29',0.16]]}
]}
});
</script>
</body>
</html>