网站首页
百度ECharts
ECharts实例
ECharts入门
地图大全
ECharts官网
源代码:
点击运行 》
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Highcharts 实例 | web建站教程(ipkd.cn)</title> <script src="/js/jquery-1.9.0.min.js"></script> <!-- 引入 highcharts.js --> <script src="/js/highcharts.js"></script> <script src="/js/highcharts-3d.js"></script> </head> <body> <div id="myChart" width='100%' height='450'></div> <script type="text/javascript"> $(document).ready(function() { var chart = { type: 'pie', options3d: { enabled: true, alpha: 45 } }; var title = { text: 'Highcharts图表之3D圆环图' }; var subtitle = { text: '前端开发语言占比' }; var plotOptions = { pie: { innerSize: 100, depth: 45 } }; var series= [{ name: '占比量', data: [ ['vue3', 45], ['html', 26], ['css3', 12], ['node', 8], ['php', 7] ] }]; var json = {}; json.chart = chart; json.title = title; json.subtitle = subtitle; json.plotOptions = plotOptions; json.series = series; $('#myChart').highcharts(json); }); </script> </body> </html>
运行结果: