$(function(){ $('#btn_mode').click(function(){ $('#modes').toggle() }) $('#modes div').mouseenter(function () { $(this).css('color','white'); $(this).css('background','#3098fe'); }) $('#modes div').mouseleave(function () { $(this).css('background','white'); $(this).css('color','black'); }) $('#modes div').click(function(){ $("#btn_mode")[0].innerHTML = this.innerHTML $("#modes").hide() var num = this.getAttribute('value') STEP1 = num option1.series[0].nodes = createNodes() if(num == 1){ $('#input_legend').prop('checked',true); $("#line_text").show() $("#line_btn").show() FORCEMODE = 'force'; if(data.length>=1){ myChart1.clear(); myChart1.setOption(option1); } myChart1.setOption({ series:[{ scaling: $("#line_btn")[0].innerHTML, }] }) }else if(num == 2){ $('#input_legend').prop('checked',true); $("#line_text").show() $("#line_btn").show() FORCEMODE = 'force'; if(data.length>=1){ myChart1.clear(); myChart1.setOption(option1); } myChart1.setOption({ legend: { show:c_bNameL, orient:c_szLayoutL, x:c_szxalignL, y:c_szyalignL, textStyle:{ color:c_szColorL, fontSize:c_nSizeL, fontFamily:c_szFamilyL, fontStyle:c_szStyleL, fontWeight:c_szWeightL, }, data:LNAME[0], zlevel:1 }, series:[{ scaling: $("#line_btn")[0].innerHTML }] }) }else{ $("#line_text").hide() $("#line_btn").hide() $("#lines").hide() FORCEMODE = 'chord'; if(data.length>=1){ myChart1.clear(); myChart1.setOption(option1); myChart1.setOption( { legend: { show:c_bNameL, orient:c_szLayoutL, x:c_szxalignL, y:c_szyalignL, textStyle:{ color:c_szColorL, fontSize:c_nSizeL, fontFamily:c_szFamilyL, fontStyle:c_szStyleL, fontWeight:c_szWeightL, }, data:LNAME[0], zlevel:1 }, series : [ { type: FORCEMODE, zlevel:1, //linkSymbol:'arrow', links :(function(){ var res = []; for(var i = 0;i=1){ myChart1.setOption( { legend:{ show:c_bNameL, zlevel:1 } } ); } }else{ c_bNameL = false; if(data.length>=1){ myChart1.setOption( { legend:{ show:c_bNameL, zlevel:1 } } ); } } }) for(var i = 1;i<=data.length;i++){ if(data.length==1){ $('#charts'+i).css("height",cheight); $('#charts'+i).css("width",cwidth); } } loadCharts(); window.onresize = function(){ $(".warp").css("left",document.body.clientWidth-23); $(".warp").css("top",document.body.clientHeight-25); cheight = document.documentElement.clientHeight-2; cwidth = document.documentElement.clientWidth; for(var i = 1;i<=data.length;i++){ if(data.length==1){ $('#charts'+i).css("height",cheight); $('#charts'+i).css("width",cwidth); } } if(data.length>=1) myChart1.resize(); } }); //c++参数转换为js参数 var PIEMARGIN = 100; if(c_szMarginLeftP!=0){ if(PIEMARGIN>=100 - Number(c_szMarginLeftP.replace('%',''))-30) PIEMARGIN = 100 - Number(c_szMarginLeftP.replace('%',''))-30; } if(c_szMarginRightP!=0){ if(PIEMARGIN>=100 - Number(c_szMarginRightP.replace('%',''))-30) PIEMARGIN = 100 - Number(c_szMarginRightP.replace('%',''))-30; } if(c_szMarginTopP!=0){ if(PIEMARGIN>=100 - Number(c_szMarginTopP.replace('%',''))-30) PIEMARGIN = 100 - Number(c_szMarginTopP.replace('%',''))-30; } if(c_szMarginBottomP!=0){ if(PIEMARGIN>=100 - Number(c_szMarginBottomP.replace('%',''))-30) PIEMARGIN = 100 - Number(c_szMarginBottomP.replace('%',''))-30; } if(c_bNameT=='0'){ c_bNameT = false; }else{ c_bNameT = true; } if(c_bNameL=='0'){ c_bNameL = false; }else{ c_bNameL = true; } if(c_bNameX=='0'){ c_bNameX = false; }else{ c_bNameX = true; } if(c_bNameY=='0'){ c_bNameY = false; }else{ c_bNameY = true; } //c++参数转换为js参数 for(var i = 0;i=0&&ARRVALUE11[0][i]<=20){ node.category = 0; }else if(ARRVALUE11[0][i]>20&&ARRVALUE11[0][i]<=30){ node.category = 1; }else if(ARRVALUE11[0][i]>30){ node.category = 2; } res.push(node) } for(var i = 0;i=0&&RELTCC1[i]<=20) node.category = 0 else if(RELTCC1[i]>20&&RELTCC1[i]<=30) node.category = 1 else if(RELTCC1[i]>30) node.category = 2 if(ARRVALUE1[0][ARRKEY1[0].indexOf(RELKEY1[i])]) node.name = RELKEY1[i] + '(' + ARRVALUE1[0][ARRKEY1[0].indexOf(RELKEY1[i])] + ')' else node.name = node.name = RELKEY1[i] + '(' + RELVALUE1[i] + ')' res.push(node) } return res; } function loadCharts() { for(var i = 0;i'; var n = ARRKEY1[0].indexOf(name); if(n!=-1){ for(var i = 0;i'; } return s; } }else{ var n = ARRKEY1[0].indexOf(name); var x = RELKEY1.indexOf(name); var s = name+'('+e.value+'篇'; if(n!=-1){ s += ','+ARRVALUE11[0][n]+')
'; for(var i = 0;i'; } }else{ var ms = 0; for(var i = 0;i'; if(ARRVALUE1[0][i]!=0.5&&ARRVALUE1[0][i]!=0){ s += ARRKEY1[0][i] + '('+ARRVALUE1[0][i]+'篇,'+ARRVALUE11[0][i]+'),('+ARRVALUE2[0][i][m]+'篇,'+ARRVALUE21[0][i][m]+')
'; }else{ s += ARRKEY1[0][i]+'('+ARRVALUE2[0][i][m]+'篇,'+ARRVALUE21[0][i][m]+')
'; } }else if(m!=-1){ if(ARRVALUE1[0][i]!=0.5&&ARRVALUE1[0][i]!=0){ s += ARRKEY1[0][i] + '('+ARRVALUE1[0][i]+'篇,'+ARRVALUE11[0][i]+'),('+ARRVALUE2[0][i][m]+'篇,'+ARRVALUE21[0][i][m]+')
'; }else{ s += ARRKEY1[0][i]+'('+ARRVALUE2[0][i][m]+'篇,'+ARRVALUE21[0][i][m]+')
'; } } } } return s; } }else{ ISALL = 0; var name1 = e.name.substring(0,e.name.lastIndexOf('-')).trim(); name1 = name1.substring(0,name1.lastIndexOf('(')) var name2 = e.name.substring(e.name.lastIndexOf('-')+1).trim(); name2 = name2.substring(0,name2.lastIndexOf('(')) var temp1 = []; for(var i = 0;i