Skip to main content

NBA 历史最差成绩

 

link:

jsfiddle.net/gh/get/jquery/3.1.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/scatter/

http://jsfiddle.net/gh/get/jquery/3.1.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/column-rotated-labels/

Code:

<script src=”https://code.highcharts.com/highcharts.js”></script>
<script src=”https://code.highcharts.com/modules/exporting.js”></script>

<div id=”container” style=”min-width: 300px; height: 400px; margin: 0 auto”></div>

 

$(function () {
Highcharts.chart(‘container’, {
chart: {
type: ‘column’
},
title: {
text: ‘NBA 史上最差胜率球队!’
},
subtitle: {
text: ‘来源:NBA’
},
xAxis: {
type: ‘category’,
labels: {
rotation: -45,
style: {
fontSize: ’13px’,
fontFamily: ‘Verdana, sans-serif’
}
}
},
yAxis: {
min: 0,
title: {
text: ‘胜率(%)’
}
},
legend: {
enabled: false
},
credits: {
enabled: false
},
tooltip: {
pointFormat: ‘胜率: <b>{point.y:.1f} %</b>’
},
series: [{
name: ‘Population’,
data: [
[‘2012-山猫:7-59’, 10.6],
[‘1973-76人:9-73’, 11.0],
[‘2016-76人:10-72’, 12.2],
[‘1993-小牛:11-71’, 13.4],
[‘1998-掘金:11-71’, 13.4],
[‘1987-快船:12-70’, 14.6],
[‘2010-篮网:12-70’, 14.6],
[‘1994-小牛:13-69’, 15.9],
[‘2005-老鹰:13-69’, 15.9],
],
dataLabels: {
enabled: true,
rotation: -90,
color: ‘#FFFFFF’,
align: ‘right’,
format: ‘{point.y:.1f}’, // one decimal
y: 10, // 10 pixels down from the top
style: {
fontSize: ’13px’,
fontFamily: ‘Verdana, sans-serif’
}
}
}]
});
});

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.