让人个人
来源:互联网 发布:php魔术方法isset() 编辑:程序博客网 时间:2024/05/16 03:05
<script type="text/javascript"> // 基于准备好的dom,初始化echarts实例 var myChart = echarts.init(document.getElementById('main')); // 加载同目录下json文件中的json数据 $.getJSON("data.json", function(linedata) { var option = { //设置整个页面的背景颜色 backgroundColor: new echarts.graphic.RadialGradient( 0.3, 0.3, 0.8,[{ offset: 0, color: '#f7f8fa' }, { offset: 1, color: '#cdd0d5' }]), //设置标题 title: { text: "学者合作信息图", top: "top", left: "center" }, tooltip: {}, legend: [{ formatter: function(name) { return echarts.format.truncateText(name, 40, '14px Microsoft Yahei', '…'); }, tooltip: { show: true }, selectedMode: 'false', bottom: 20, }], //右上角的三个工具按钮 toolbox: { show: true, feature: { dataView: { show: true, readOnly: true }, restore: { show: true }, saveAsImage: { show: true } } }, animationDuration: 3000, animationEasingUpdate: 'quinticInOut', //图片的形式 series: [{ name: 'scholar', type: 'graph', layout: 'force', force: { repulsion: 1000 }, //设置节点信息和边的信息 data: linedata.data, links: linedata.links, categories: [{ 'name': '分类1' }, { 'name': '分类2' }, { 'name': '分类3' }, { 'name': '分类4' }, { 'name': '分类5' }], focusNodeAdjacency: true, roam: true, label: { normal: { show: true, position: 'top', } }, //边的格式 lineStyle: { normal: { opacity: 1, width: 1, curveness: 0.1 } } }] }; myChart.setOption(option) myChart.on('dblclick', function (params) { window.open('https://www.baidu.com/s?wd=' + encodeURIComponent(params.name));});myChart.on('click', function (params) {$.getJSON("detail.json", function(detail){if (params.name in detail) {var name = document.getElementById("name");var head = document.getElementById("header");var sex = document.getElementById("sex");var bachelor_uni = document.getElementById("bachelor_uni");var bachelor_uni1 = document.getElementById("bachelor_uni1");var doctor_uni = document.getElementById("doctor_uni");var doctor_uni1 = document.getElementById("doctor_uni1");var master_uni = document.getElementById("master_uni");var master_uni1 = document.getElementById("master_uni1");var research_direction = document.getElementById("research_direction");var research_direction1 = document.getElementById("research_direction1");var tutor = document.getElementById("tutor");var tutor1 = document.getElementById("tutor1");//更新文本框中对应学者的信息name.innerHTML = "name: "+params.name;head.innerHTML = "Detail";sex.innerHTML = "sex: " + detail[params.name].sex;bachelor_uni1.innerHTML = "bachelor_uni: "bachelor_uni.innerHTML = detail[params.name].bachelor_uni;doctor_uni1.innerHTML = "doctor_uni: "doctor_uni.innerHTML = detail[params.name].doctor_uni;master_uni1.innerHTML = "master_uni: "master_uni.innerHTML = detail[params.name].master_uni;research_direction1.innerHTML = "research_direction: "research_direction.innerHTML = detail[params.name].research_direction;tutor1.innerHTML = "tutor: "tutor.innerHTML = detail[params.name].tutor;}}); });}) </script>
阅读全文
0 0
- 让人个人
- 让他个人
- 对方个人会让他
- 让人生厌的个人品质和个人行为
- 路由器端口映射,远程桌面连接--端口映射+花生壳=让人访问你个人服务器或WEB站点
- 个人信念,坚持独立自主的判断,朋友之间的买卖让人难为情
- 让你的个人效率翻三倍
- 让你的个人效率翻三倍
- 让你的个人效率翻三倍
- 让你的个人效率翻三倍
- 让你的个人效率翻三倍
- 让你的个人效率翻三倍
- 个人让他以后粉丝团
- 让你不再害怕指针【个人总结】
- 发给热狗人个人个人
- 怎样才能让活期存款的利息翻倍 个人通知存款
- 如何让个人卓越的计划得到实施
- 企业资本运营,让老板淡出个人神话
- 数据结构(1)-线性表
- 拆分配置文件
- 2017.11.12笔记
- 火车票购票系统模式
- TCP之实现简单聊天室
- 让人个人
- iOS SDWebimage~SDImageCache计算缓存大小
- 学习MultiViewAdapter——1
- AJax提交表单数据到后台springmvc接收
- electron 将pc端(vue)页面打包为桌面端应用
- 简单的mvp+retrofit+rxjava示例
- C语言删除链表中的结点
- 腾讯企业邮箱阿里云端口25发送失败
- 使用多文件编译线性表时出现,LNK2005:int_cdecl int_list(..) 解决办法