简单教程
提交运行
代码编辑器:
<!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: 'pie', options3d: { enabled: true, alpha: 45 } }; var title = { text: '每周水果配送量' }; var subtitle = { text: 'Highcharts 3D圆环图' }; var plotOptions = { pie: { innerSize: 100, depth: 45 } }; var series= [{ name: '配送量', data: [ ['Bananas', 8], ['Kiwi', 3], ['Mixed nuts', 1], ['Oranges', 6], ['Apples', 8], ['Pears', 4], ['Clementines', 4], ['Reddish (bag)', 1], ['Grapes (bunch)', 1] ] }]; var options = {}; options.chart = chart; options.title = title; options.subtitle = subtitle; options.plotOptions = plotOptions; options.series = series; var chart = Highcharts.chart('container',options); </script>
运行结果: