HighCharts之2D对数饼图

时间:2022-05-01 12:09:26

HighCharts之2D对数饼图


1、实例源码

LogarithmicPie.html:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>HighCharts 2D对数饼图</title>
<script type="text/javascript" src="../scripts/jquery-1.11.0.js"></script>
<script type="text/javascript" src="../scripts/js/highcharts.js"></script>
<script type="text/javascript">
$(function(){
$('#logarithmicPieChart').highcharts({

chart: {
},

title: {
text: '对数轴饼图'
},

xAxis: {
tickInterval: 2
},

yAxis: {
type: 'logarithmic',
minorTickInterval: 0.5
},

tooltip: {
headerFormat: '<b>{series.name}</b><br />',
pointFormat: 'x = {point.x}, y = {point.y}'
},

series: [{
data: [1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683,59049,177147,531441,1594323],
pointStart: 1
}]
});
});
</script>
</head>
<body>
<div id="logarithmicPieChart" style="width: 1200px; height: 500px; margin: 0 auto"></div>
</body>
</html>

2、实例结果

HighCharts之2D对数饼图