当前位置: 首页 > news >正文

求和萝莉做的网站/新媒体seo培训

求和萝莉做的网站,新媒体seo培训,网站建设新模式,代理注册公司排名感觉好久没有更新博客了,最近一直忙着毕业论文,紧接着就开始搭建数据库,实在抽不出时间写。 正好趁着做数据库,写一写关于Highchart里两个饼图之间的互动。 用到的数据比较大,我也懒得修饰了,涉及到两个pie…

感觉好久没有更新博客了,最近一直忙着毕业论文,紧接着就开始搭建数据库,实在抽不出时间写。

正好趁着做数据库,写一写关于Highchart里两个饼图之间的互动。

用到的数据比较大,我也懒得修饰了,涉及到两个pie图的div,分别是 pie_container 和 signature_container

先说明一下画 signature_container  时为了和  pie_container 互动,定义了一个函数,画图的数据利用 ajax 读取:

function signature_pie(cancer_type){var data_arr = [{name: "gene", y: 0.4},{name: "protein", y: 0.2},{name: "lncRNA", y: 0.1},{name: "miRNA", y: 0.1},{name: "mutation", y: 0.1},{name: "methylation", y: 0.1}];var options = {chart: {plotBackgroundColor: null,plotBorderWidth: null,plotShadow: false,type: 'pie',},title: {text: 'signature type statistics',style:{fontSize: "20px"},y: 10,x:-5},tooltip: {pointFormat: 'Cohort precentage: <b>{point.percentage:.1f}%</b>'},credits: {enabled: false},plotOptions: {pie: {allowPointSelect: true,cursor: 'pointer',events: {click: function(event){var signature_type = event.point.name;document.getElementById("choose_signature_type").innerHTML = "<b>" + signature_type + "</b>";}},dataLabels: {enabled: false,color: "black",format: '<b>{point.name}</b>: {point.percentage:.1f} %',}}},series: [{names: 'signature stat',data: data_arr}]};if(cancer_type == "ALL"){Highcharts.chart('signature_container', options);} else {$.ajax({url: '../data/test.txt',dataType: 'text',type: 'GET',async: false,success: function(data) {var lines = data.split('\n');for(var index = 1; index < (lines.length - 1); index++){var info = lines[index].split('\t');if(info[0] == cancer_type){for(var i = 1; i < (info.length-1); i++){options.series[0].data[i-1].y = parseFloat(info[i]);}Highcharts.chart('signature_container', options);break;}}}});}
}

  

下面是 pie_container 的 options:

var options = {chart: {plotBackgroundColor: null,plotBorderWidth: null,plotShadow: false,type: 'pie',},title: {text: 'cancer type statistics',style:{fontSize: "20px"},y: 10,x:-5},tooltip: {pointFormat: 'Type is <b>{point.type}<b><br/>Cohort precentage: <b>{point.percentage:.1f}%</b>'},credits: {enabled: false},plotOptions: {pie: {allowPointSelect: true,cursor: 'pointer',events: {click: function(event){var cancer_type = event.point.name;document.getElementById("choose_cancer_type").innerHTML = "<b>" + cancer_type + "</b>";
         //利用signature_pie()函数,根据对应数据重新画一个pie图javascript:signature_pie(cancer_type);var index = event.point.index;options.series[0].data[index]['selected'] = 'true';options.series[0].data[index]['sliced'] = 'true';Highcharts.chart('pie_container', options);options.series[0].data[index]['selected'] = '';options.series[0].data[index]['sliced'] = '';}},dataLabels: {enabled: false,color: "black",format: '<b>{point.name}</b>: {point.percentage:.1f} %',}}},series: [{names: 'cancer stat',data: [{name: 'ACC', y: 0.00602188825469969, type: 'A'},{name: 'BLCA', y: 0.0293239775881028, type: 'A'},{name: 'BRCA', y: 0.0532544378698225, type: 'B'},{name: 'CESC', y: 0.011520134052469, type: 'B'},{name: 'CHOL', y: 0.00314185474158245, type: 'B'},{name: 'COADREAD', y: 0.0395873697439388, type: 'A'},{name: 'COAD', y: 0.029585798816568, type: 'D'},{name: 'DLBC', y: 0.00382258993559198, type: 'D'},{name: 'ESCA', y: 0.0112059485783107, type: 'D'},{name: 'GBMLGG', y: 0.0756663350264439, type: 'C'},{name: 'GBM', y: 0.0327800178038435, type: 'C'},{name: 'HNSC', y: 0.0432005026967587, type: 'A'},{name: 'KICH', y: 0.00837827931088653, type: 'B'},{name: 'KIPAN', y: 0.0774990836257004, type: 'D'},{name: 'KIRC', y: 0.0473896423522019, type: 'C'},{name: 'KIRP', y: 0.0251348379326596, type: 'A'},{name: 'LAML', y: 0.0116772267895481, type: 'A'},{name: 'LGG', y: 0.0444048803476986, type: 'C'},{name: 'LIHC', y: 0.0315232759072106, type: 'B'},{name: 'LUAD', y: 0.0424674032570561, type: 'C'},{name: 'LUSC', y: 0.0116248625438551, type: 'C'},{name: 'OV', y: 0.043671780907996, type: 'A'},{name: 'PAAD', y: 0.0190082211865738, type: 'D'},{name: 'PCPG', y: 0.0109441273498455, type: 'D'},{name: 'PRAD', y: 0.0450332512960151, type: 'D'},{name: 'READ', y: 0.0123055977378646, type: 'A'},{name: 'SARC', y: 0.0142430748285071, type: 'C'},{name: 'SKCM', y: 0.0388542703042363, type: 'B'},{name: 'STAD', y: 0.0378069853903754, type: 'A'},{name: 'STES', y: 0.047494370843588, type: 'D'},{name: 'TGCT', y: 0.00942556422474734, type: 'C'},{name: 'THCA', y: 0.0492747551971514, type: 'A'},{name: 'THYM', y: 0.00774990836257004, type: 'B'},{name: 'UCEC', y: 0.0151332670052888, type: 'D'},{name: 'UCS', y: 0.00429386814682934, type: 'A'},{name: 'UVM', y: 0.00555061004346232, type: 'C'},]}] }

  

转载于:https://www.cnblogs.com/wwdPeRl/p/9069197.html

http://www.jmfq.cn/news/4756951.html

相关文章:

  • 做网站框架/seo兼职招聘
  • 怎么在网站上做签到/百度小程序优化
  • 做批发是国际购物网站有哪些/网站怎么优化关键词快速提升排名
  • 如何开发电子商务网站/北京网络推广有哪些公司
  • 百度网站自然排名优化/谷歌海外推广
  • wordpress带个人中心/seo行业岗位
  • 企业 网站 程序/推广链接
  • 专业制作网站多少钱/上海网站建设方案
  • 旅游网站开发的作用/顾问
  • 自己的网站怎么做seo/东莞新闻最新消息今天
  • 网站建设代码生成器/网络产品及其推广方法
  • 负责加强局网站建设/浙江seo外包
  • wordpress两种语言主题/天津seo霸屏
  • 做网站同行/站长工具综合查询ip
  • 做企业网站收费价格/广告营销案例100例
  • 济南58同城网/seo任务
  • 爱站查询/公司模板建站
  • 网站导航栏注明做/免费手机网站建站平台
  • 在线制作印章图片/seo 页面
  • 做企业网站用php/郑州网站优化
  • 怎么免费做网站/世界大学排名
  • wordpress 获取备案号/广州seo和网络推广
  • 旅游网站html5代码模板/网络营销方案
  • discuz插件/广州seo效果
  • 美国一级a做爰片免费网站 视频/百度 营销推广多少钱
  • 网站开发违法/360网站安全检测
  • 厦门最早做网站的公司/seo全称是什么
  • 罗田网站建设/微博seo排名优化
  • 佛山公司网站建设价格/网上推广企业
  • vps网站被镜像/100%上热门文案