Created
November 9, 2013 12:04
-
-
Save rankun203/7384752 to your computer and use it in GitHub Desktop.
创建一张highcharts图表
http://api.highcharts.com/highcharts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function () { | |
$('#exercise-stat-chart-2').highcharts({ | |
title: { | |
text: '' | |
}, | |
xAxis: { | |
title: { | |
text: '课次' | |
}, | |
allowDecimals: false, | |
type: 'linear' | |
}, | |
yAxis: { | |
title: { | |
text: '分数' | |
}, | |
max: 100, | |
plotLines: [{ | |
value: 0, | |
width: 1, | |
color: '#808080' | |
}] | |
}, | |
tooltip: { | |
valueSuffix: '分', | |
headerFormat: '<b>第 {point.key} 课</b><br>' | |
}, | |
legend: { | |
layout: 'vertical', | |
align: 'right', | |
verticalAlign: 'middle', | |
borderWidth: 0 | |
}, | |
series: [{ | |
name: '最高分', | |
color: '#fa8d00', | |
marker: { | |
symbol: 'circle' | |
}, | |
data: [50, 33, 9], | |
pointStart: 1 | |
},{ | |
name: '平均分', | |
color: '#2777e5', | |
marker: { | |
symbol: 'circle' | |
}, | |
data: [38, 28, 3], | |
pointStart: 1 | |
},{ | |
name: '最低分', | |
color: '#08a54e', | |
marker: { | |
symbol: 'circle' | |
}, | |
data: [20, 9, 3], | |
pointStart: 1 | |
} | |
] | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment