Skip to content

Instantly share code, notes, and snippets.

@lyuehh
Created August 20, 2014 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lyuehh/8bf5486521aafc7ff46d to your computer and use it in GitHub Desktop.
Save lyuehh/8bf5486521aafc7ff46d to your computer and use it in GitHub Desktop.
$(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