Created
August 20, 2014 07:20
-
-
Save lyuehh/8bf5486521aafc7ff46d to your computer and use it in GitHub Desktop.
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 () { | |
$('#container').highcharts({ | |
chart: { | |
type: 'column', | |
options3d: { | |
enabled: true, | |
alpha: 15, | |
beta: 15, | |
viewDistance: 25, | |
depth: 40 | |
}, | |
marginTop: 80, | |
marginRight: 40 | |
}, | |
title: { | |
text: 'Total fruit consumption, grouped by gender' | |
}, | |
xAxis: { | |
categories: ['机器1', '机器2', '机器3', '机器4', '机器5'] | |
}, | |
yAxis: { | |
allowDecimals: false, | |
min: 0, | |
title: { | |
text: 'Number of fruits' | |
} | |
}, | |
tooltip: { | |
headerFormat: '<b>{point.key}</b><br>', | |
pointFormat: '<span style="color:{series.color}">\u25CF</span> {series.name}: {point.y} / {point.stackTotal}' | |
}, | |
plotOptions: { | |
column: { | |
stacking: 'normal', | |
depth: 40 | |
} | |
}, | |
series: [ | |
{ | |
"name": 'cpu已使用', | |
"data": [3, 4, 4, 2, 5], | |
"stack": 'cpu' | |
}, { | |
"name": 'mem已使用', | |
"data": [3, 2, 4, 4, 3], | |
"stack": 'mem' | |
}, | |
{ | |
"name": 'disk已使用', | |
"data": [3, 4, 4, 2, 5], | |
"stack": 'disk' | |
}, { | |
"name": 'net已使用', | |
"data": [3, 2, 4, 4, 3], | |
"stack": 'net' | |
}, { | |
"name": 'net已使用', | |
"data": [3, 2, 4, 4, 3], | |
"stack": 'io' | |
}] | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment