数据怎么从数据库获取,如data中内容:$(function () { $('#container').highcharts({
title: {
text: '油 耗',
x: -20 //center
},
subtitle: {
text: 'Oil Wear',
x: -20
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
yAxis: {
title: {
text: 'OilWear (L)'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
valueSuffix: 'L'
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle',
borderWidth: 0
},
series: [{
name: '油耗',
data: [
12,4,5,7,32,12
]
}]
});
});
|