1.引用js文件

<script type="text/javascript" src="http://cdn.hcharts.cn/jquery/jquery-1.8.2.min.js"></script>

<script src="/global/plugins/highcharts/highcharts.js" type="text/javascript"></script>
<script src="/global/plugins/highcharts/highcharts-3d.js" type="text/javascript"></script>
<!-- <script src="/global/plugins/highcharts/themes/grid.js" type="text/javascript"></script>-->
<script src="/global/plugins/highcharts/modules/exporting.js" type="text/javascript"></script>

2.主体部分

<div id="container" style="min-width:400px;height:400px"></div>

$(function () {

    $(document).ready(function () {

        // Build the chart
$('#container').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: true
},
title: {
text: '数值显示在图形区域'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
distance: -30,
format:'<b>{point.y}</b>', },
showInLegend: true }
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle',
borderWidth: 0
},
series: [{
type: 'pie',
name: '占比',
distance: -10,
data: [
['Firefox', 45.0],
['IE', 26.8],
{
name: 'Chrome',
y: 12.8,
sliced: true,
selected: true
}
]
}]
});
}); });

最新文章

  1. VirtualBox虚拟机运行Ubuntu如何不卡
  2. 地图定位IOS8之后的定位
  3. OC-内存管理-基本原理与引用计数器
  4. Watir资源列表【转】
  5. PLSQL_性能优化系列18_Oracle Explain Plan解析计划通过Baseline绑定
  6. hive[3] 数据类型和文件格式
  7. 【Construct Binary Tree from Preorder and Inorder Traversal】cpp
  8. SqlServer中创建Oracle连接服务器
  9. CodeFile与CodeBehind的区别
  10. 使用selenium时提示:ImportError:No module named selenium
  11. Spring Boot 使用 Log4j2
  12. SQL 获取时间段内日期列表
  13. 精读《Scheduling in React》
  14. Numpy安装
  15. lrzsz 移植到 ARM-linux 嵌入式板子上
  16. 【delphi】delphi操作sqlite3
  17. Entity Framework应用:EntityFramework DataBase First模式
  18. 2018.4.23 linux系统
  19. Oracle中NVARCHAR2与VARCHAR2的相互转换
  20. i2c 异常之i2c1 prob 检测超时

热门文章

  1. MySQL的xml中对大于,小于,等于的处理转换
  2. 论一个X倒下了千千万万个X站起来了
  3. [NOIP2019模拟赛]LuoguP4261白金元首与克劳德斯
  4. [模拟退火][UVA10228] A Star not a Tree?
  5. 跟我一起使用socket.io创建聊天应用
  6. LUOGU P4163 [SCOI2007]排列
  7. nc 文件的nan识别
  8. Solrj demo
  9. python 读取excel Xlrd模块
  10. quartz任务调度基础: Job/Trigger/Schedule