$(document).ready(function() {
var chart = {
type: 'column',
margin: 75,
options3d: {
enabled: true,
alpha: 10,
beta: 25,
depth: 70
}
};
var title = {
text: 'Highcharts图表之3D柱状图(可以传空值)'
};
var subtitle = {
text: '注意 0 和 null 的区别'
};
var xAxis = {
categories: Highcharts.getOptions().lang.shortMonths
};
var yAxis = {
title: {
text: null
}
};
var series= [{
name: 'Sales',
data: [2, 3, null, 4, 0, 5, 1, 4, 6, 3]
}];
var json = {};
json.chart = chart;
json.title = title;
json.subtitle = subtitle;
json.xAxis = xAxis;
json.yAxis = yAxis;
json.series = series;
$('#myChart').highcharts(json);
});
点击运行 》