Skip to content

Instantly share code, notes, and snippets.

@rankun203
Created November 9, 2013 12:04
Show Gist options
  • Save rankun203/7384752 to your computer and use it in GitHub Desktop.
Save rankun203/7384752 to your computer and use it in GitHub Desktop.
创建一张highcharts图表 http://api.highcharts.com/highcharts
$(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