highcharts / index.html
changxin's picture
Update index.html
8d7fbd2
<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: 'column'},
title: {text: '2021年1月-6月,各城市贡献份额'},
subtitle: {text: '点击可查看具体产值数据,数据来源: <a href="https://pbihub.cn">chuiniubi.com</a>.'},
xAxis: {type: 'category'},
yAxis: {title: {text: '总的贡献份额'}},
legend: {enabled: false},
plotOptions: {series: {borderWidth: 0,dataLabels: {enabled: true,format: '{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: '佛山'},
{name: '吹牛逼',y: 0.2,drilldown: null}
]}],
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>