简单教程
提交运行
代码编辑器:
<!doctype html> <meta charset="utf-8" /> <title>Highcharts 基础教程 | 简单教程(www.twle.cn)</title> <script src="https://cdn.hcharts.cn/highcharts/highcharts.js"></script> <script src="https://cdn.hcharts.cn/highcharts/highcharts-3d.js"></script> <div id="container" style="width: 500px; height: 400px; margin: 0 auto"></div> <script> var chart = { type: 'column', margin: 75, options3d: { enabled: true, alpha: 10, beta: 25, depth: 70 } }; var title = { text: '带空值的 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 options = {}; options.chart = chart; options.title = title; options.subtitle = subtitle; options.xAxis = xAxis; options.yAxis = yAxis; options.series = series; var chart = Highcharts.chart('container',options); </script>
运行结果: