$(function(){ $('#input_reverse').change(function(){ var XYName; XYName = c_XAxisName; c_XAxisName = c_YAxisName; c_YAxisName = XYName; myChart1.dispose(); if(this.checked==true){ ISRESERVE = 1; concatp(); loadCharts(); }else{ ISRESERVE = 0; concat(); loadCharts(); } }) $('#mybody').click(function(){ $('#btn_cnt').hide(); $('#modalb1').hide(); $('#modalb2').hide(); STEP = 0; }) // y轴begin var html = ''; for(var i = 0;i'; } $('#modalb1')[0].innerHTML = html; $('#modalb1 div').mouseenter(function () { $(this).css('color','white'); $(this).css('background','#3098fe'); }) $('#modalb1 div').mouseleave(function () { $(this).css('background','white'); $(this).css('color','black'); }) $('#modalb1 div').click(function () { $('#modalb1').css('display','none'); var YTITLE = $(this)[0].innerText.trim(); $('#fig_btn1')[0].innerHTML = YTITLE; Y = CARR.indexOf(YTITLE); loadCharts(); }) // y轴end $('#fig_btn1').click(function () { $('#modalb1').toggle(); }) // y轴begin var html = ''; for(var i = 0;i'; } $('#modalb2')[0].innerHTML = html; $('#modalb2 div').mouseenter(function () { $(this).css('color','white'); $(this).css('background','#3098fe'); }) $('#modalb2 div').mouseleave(function () { $(this).css('background','white'); $(this).css('color','black'); }) $('#modalb2 div').click(function () { $('#modalb2').css('display','none'); var YTITLE = $(this)[0].innerText.trim(); $('#fig_btn2')[0].innerHTML = YTITLE; Y2 = CARR.indexOf(YTITLE); loadCharts(); }) // y轴end $('#fig_btn2').click(function () { $('#modalb2').toggle(); }) $('#input_legend').change(function(){ if(this.checked==true){ LEGENDMODE = true; loadCharts(); }else{ LEGENDMODE = false; loadCharts(); } }) $('#input_label').change(function(){ if(this.checked==true){ LABELSHOW = true; loadCharts(); }else{ LABELSHOW = false; loadCharts(); } }) $('#charts1').css("height",cheight); $('#charts1').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; $('#charts1').css("height",cheight); $('#charts1').css("width",cwidth); MWIDTH = document.documentElement.clientWidth*(100-Number(c_szMarginLeftP.replace('%',''))-Number(c_szMarginRightP.replace('%','')))*0.01/ARRKEY1.length-16; myChart1.resize(); } }) var Y = 0; var Y2 = 1; //c++参数转换为js参数 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参数 var MWIDTH = document.documentElement.clientWidth*(100-Number(c_szMarginLeftP.replace('%',''))-Number(c_szMarginRightP.replace('%','')))*0.01/ARRKEY1.length-16; var data = [1]; var COLORS = THEMECOLOR[Number(c_nTheme)]; function sort(x,y){ return y - x; } function sort1(x,y){ return y[1] - x[1]; } if(flag==1){ Y=3; Y2=0; $("#fig_btn1").html(CARR[3]) $("#fig_btn2").html(CARR[0]) } var ARRVALUEH = []; var ARRVALUER = []; for(var i = 0;i=1&&tempstr.substring(tempstr.length-2,tempstr.length-1)==0)||((tempstr.substring(tempstr.length-1)<=2&&tempstr.substring(tempstr.length-2,tempstr.length-1)==1))) RELARRKEY2.push(mmin+i); }else if(tempstr.length==4){ RELARRKEY2.push(mmin+i); }else{ RELARRKEY2.push(mmin+i); } } if(!isNaN(Number(ARRKEY2[0]))){ for(var i = 0;i=mymax){ mymax = Number(arrvaluep2[i][j].split(':')[Y+1]); } if(Number(arrvaluep2[i][j].split(':')[Y2+1])>=mymax2){ mymax2 = Number(arrvaluep2[i][j].split(':')[Y2+1]); } } } MWIDTH = document.documentElement.clientWidth*(100-Number(c_szMarginLeftP.replace('%',''))-Number(c_szMarginRightP.replace('%','')))*0.01/arrnamep1.length-16; //} per = 20/mymax; per2 = MWIDTH/mymax2; myChart1 = echarts.init(document.getElementById('charts1'),c_nTheme); var inter = 0 for (var i = 0; i < arrnamep1.length; i++) { if (/^\d{4}$/.test(arrnamep1[i])) { inter = 'auto' } } // fmxData = fmxData.map(function (item) { // return [item[1], item[0], item[2]]; // }); var option1 = { animation: ani, title: { show:c_bNameT, text: text, //subtext: CARR[Y[0]-1], x:c_szXAlignT, y:c_szYAlignT, textStyle:{ color:c_szColorT, fontSize:Number(c_nSizeT)+4, fontFamily:c_szFamilyT, fontStyle:c_szStyleT, fontWeight:c_szWeightT, }, }, // legend: { // show:true, // data: arrname1, // left: 'center' // }, grid: { left:c_szMarginLeftP, right:c_szMarginRightP, top:c_szMarginTopP, bottom:c_szMarginBottomP, containLabel: false }, toolbox: { show: true, feature: { // dataZoom: {}, //dataView: {readOnly: false}, saveAsImage:{} } }, tooltip: { position: 'top', formatter:function(e){ return CARR[Y]+'
'+'x:'+arrnamep1[e.data[0]]+'
'+'y:'+arrnamep2[e.data[1]]+'
'+'z:'+e.data[2]; //console.log(e,'e'); } }, xAxis: { type: 'category', data: arrnamep1, splitArea: { show: false }, show:c_bNameX, name:c_XAxisName, nameLocation:c_szLocationX, nameTextStyle:{ color:c_szColorX, fontSize:parseInt(c_nSizeX)+4, fontFamily:c_szFamilyX, fontStyle:c_szStyleX, fontWeight:c_szWeightX, }, axisLabel:{ interval: inter, rotate:c_szXRotate, color:c_szColorX, fontSize:c_nSizeX, fontFamily:c_szFamilyX, fontStyle:c_szStyleX, fontWeight:c_szWeightX, formatter:function(value) { return c_showX(1,value) }, rich:{ v:{ fontSize:c_nSizeX, fontFamily:c_szFamilyX, fontStyle:c_szStyleX, fontWeight:c_szWeightX, padding: [0, 0, 5, 0], }, v1:{ fontSize:c_nSizeX, fontFamily:c_szFamilyX, fontStyle:c_szStyleX, fontWeight:c_szWeightX, padding: [0, 0, -5, 0], }, } }, axisLine:{ show:true, lineStyle:{ width:c_szLineWidthX, color: c_szLineColorX } }, splitLine:{ lineStyle:{ width:c_szSplitLineWidthX, type:c_szSplitLineTypeX } }, }, yAxis: { type: 'category', data: arrnamep2, splitArea: { show: false }, show:c_bNameY, name:c_YAxisName, nameLocation:c_szLocationY, nameTextStyle:{ color:c_szColorY, fontSize:parseInt(c_nSizeY)+4, fontFamily:c_szFamilyY, fontStyle:c_szStyleY, fontWeight:c_szWeightY, }, axisLabel:{ interval:0, rotate:c_szYRotate, color:c_szColorY, fontSize:c_nSizeY, fontFamily:c_szFamilyY, fontStyle:c_szStyleY, fontWeight:c_szWeightY, formatter:function(value) { if(value.indexOf("-")>-1){ var arr2 = value.split("-") value = arr2[0] } return c_showY(1,value) }, rich:{ v:{ fontSize:c_nSizeY, fontFamily:c_szFamilyY, fontStyle:c_szStyleY, fontWeight:c_szWeightY, padding:[5,0,0,0] }, v1:{ fontSize:c_nSizeY, fontFamily:c_szFamilyY, fontStyle:c_szStyleY, fontWeight:c_szWeightY, }, } }, axisLine:{ show:true, lineStyle:{ width:c_szLineWidthY, color: c_szLineColorY } }, splitLine:{ lineStyle:{ width:c_szSplitLineWidthY, type:c_szSplitLineTypeY } }, }, series: (function(){ var res = []; // if(ISRESERVE==1){ // var temparrname = arrnamep2; // arrnamep2 = arrnamep1; // arrnamep1 = temparrname; // } for(var i = 0;i