ARRKEY1.reverse() ARRVALUE.reverse() $(function(){ title = title + "-申请量"; $('#input_reverse').change(function(){ var XYName; XYName = c_XAxisName; c_XAxisName = c_YAxisName; c_YAxisName = XYName; itemx = 0; itemy = 1; if(this.checked==true){ ISRESERVE = 1; myChart1.clear(); var html2 = ''; for(var i = 0;i'; } $('#modalb2').html(html2); $('#fig_btn2').html(ARRKEY1[1]); var html3 = ''; for(var i = 0;i'; } $('#fig_btn3').html(ARRKEY1[0]); $('#modalb3').html(html3); loadCharts(); }else{ ISRESERVE = 0; myChart1.clear(); var html2 = ''; for(var i = 0;i'; } $('#modalb2').html(html2); $('#fig_btn2').html(ARRKEY1[0]); var html3 = ''; for(var i = 0;i'; } $('#modalb3').html(html3); $('#fig_btn3').html(ARRKEY1[1]); loadCharts(); } }) if(dataM.length==1){ $('#btn_sel').hide(); } MODALNUM = CARR.length - datacount +1; for(var i = 0;i' + '
' +(i+1)+ '
'; }else{ html1 += '
' +(i+1)+ '
'; } } $('#btn_cnt')[0].innerHTML = html1; $('#btn_cnt div').click(function(){ var ss = this.innerHTML; if(ss=='全部') ss = 0; INPUTNUM = parseInt(ss); $('#btn_cnt').hide(); $('#btn_sel')[0].innerHTML = this.innerHTML; }).mouseenter(function(){ $(this).css('color','white'); $(this).css('background','#3098fe'); }).mouseleave(function(){ $(this).css('background','white'); $(this).css('color','black'); }) // y轴begin var html = ''; for(var i = 0;i'; } $('#fig_btn2').html(ARRKEY1[0]); $('#fig_btn3').html(ARRKEY1[1]); var html1 = ''; for(var i = 0;i'; } $('#modalb2').html(html1); var html2 = ''; for(var i = 0;i'; } $('#modalb3').html(html2); $('#modalb1')[0].innerHTML = html; $('#mybody').click(function(){ $('#btn_cnt').hide(); $('#modalb1').hide(); STEP = 0; }) $('#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'); YTITLE = $(this)[0].innerText.trim(); $('#fig_btn1')[0].innerHTML = YTITLE; for(i = 0;i=1){ myChart1.setOption( { legend:{ show:LEGENDMODE } } ); } }else{ LEGENDMODE = false; if(dataM.length>=1){ myChart1.setOption( { legend:{ show:LEGENDMODE } } ); } } }) $('#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.body.clientHeight-2; cwidth = document.body.clientWidth; $('#charts1').css("height",cheight); $('#charts1').css("width",cwidth); if(dataM.length>=1) myChart1.resize(); } }) //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 MYCOLORS = THEMECOLOR[Number(c_nTheme)]; var s = ARRKEY1; dataM = s; var LEGENDMODE = false; if(typeof MYPOSITION!='undefined'){ sel = [0]; for(var i = 0;i=numGray){ numGray = data['_data'][i]['_left']; } if(Number(data['_data'][i]['_right'])>=numGray){ numGray = data['_data'][i]['_right']; } } for(var i = 0;i < data['_data'].length;i++) { myData.push(data['_data'][i]['_name']); var l = parseFloat(data['_data'][i]['_left']); var r = parseFloat(data['_data'][i]['_right']); myData_l.push(data['_data'][i]['_left']); myData_r.push(data['_data'][i]['_right']); if(DISMODEL==0){ garybar.push(numGray); }else{ garybar.push(1); } var l2 = l; var r2 = r; if(DISMODEL==1){ l2 = l/(l+r); r2 = r/(l+r); } data_l.push(l2); data_r.push(r2); if(l2 > r2) { colorList1.push(MYCOLORS[0]); colorList2.push(MYCOLORS[1]); // colorList2.push('#888888'); } else if(l2 == r2) { colorList1.push(MYCOLORS[0]); colorList2.push(MYCOLORS[0]); } else { // colorList1.push('#888888'); colorList1.push(MYCOLORS[1]); colorList2.push(MYCOLORS[0]); }; } // console.log(colorList1); } dataConvert(data); var option1 = { animation:ani, title : { show:c_bNameT, text: title, //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, } }, toolbox:{ feature:{ saveAsImage:{} } }, grid: [{ show: false, left: '3%', top: 120, bottom: 2, width: '0%', }, { show: false, left: '10%', top: 100, bottom: 4, containLabel: true, width: '34%', }, { show: false, left: '49%', top: 120, bottom: 2, width: '0%', }, { show: false, right: '10%', top: 100, bottom: 4, containLabel: true, width: '34%', }, { show: false, right: '3%', top: 120, bottom: 2, width: '0%', }, { show: false, left: '23%', top: 5, bottom: 10, containLabel: true, width: '10%', }, { show: false, left: '68%', top: 5, bottom: 10, containLabel: true, width: '10%', }], xAxis: [ { show: false, }, { gridIndex: 1, type: 'value', inverse: true, axisLine: { show: false, }, axisTick: { show: false, }, position: 'top', axisLabel: { show: false, textStyle: { color: '#B2B2B2', fontSize: 12, }, }, splitLine: { show: false, lineStyle: { color: '#1F2022', width: 1, type: 'solid', }, }, }, { gridIndex: 2, show: false, }, { gridIndex: 3, type: 'value', axisLine: { show: false, }, axisTick: { show: false, }, position: 'top', axisLabel: { show: false, textStyle: { color: '#B2B2B2', fontSize: 12, }, }, splitLine: { show: false, lineStyle: { color: '#1F2022', width: 1, type: 'solid', }, }, }, { gridIndex: 4, show: false, },{ gridIndex: 5, show: false, },{ gridIndex: 6, show: false, }], yAxis: [ { type: 'category', inverse: true, position: 'right', axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: true, textStyle: { color: '#4b4b4b', fontSize: 16, }, }, data: myData_l.map(function (value) { return { value: value, textStyle: { align: 'center', } } }), }, { gridIndex: 1, type: 'category', inverse: true, position: 'right', axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: false, margin: 8, textStyle: { color: '#4b4b4b', fontSize: 12, }, }, data: myData, }, { gridIndex: 2, type: 'category', inverse: true, position: 'right', axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: true, textStyle: { color: '#4b4b4b', fontSize: 16, }, }, data: myData.map(function (value) { return { value: value, textStyle: { align: 'center', } } }), }, { gridIndex: 3, type: 'category', inverse: true, position: 'left', axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: false, textStyle: { color: '#4b4b4b', fontSize: 12, }, }, data: myData, }, { gridIndex: 4, type: 'category', inverse: true, position: 'left', axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: true, textStyle: { color: '#4b4b4b', fontSize: 16, }, }, data: myData_r.map(function (value) { return { value: value, textStyle: { align: 'center', } } }), }, { gridIndex: 5, type: 'category', inverse: true, position: 'left', axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: false, textStyle: { color: '#4b4b4b', fontSize: 16, }, }, data: myData_r.map(function (value) { return { value: value, textStyle: { align: 'center', } } }), }, { gridIndex: 6, type: 'category', inverse: true, position: 'left', axisLine: { show: false }, axisTick: { show: false }, axisLabel: { show: false, textStyle: { color: '#4b4b4b', fontSize: 16, }, }, data: myData_r.map(function (value) { return { value: value, textStyle: { align: 'center', } } }), } ], series: [ { type: 'bar', label:{ normal:{ color:c_szColorP, fontSize:c_nSizeP, fontFamily:c_szFamilyP, fontStyle:c_szStyleP, fontWeight:c_szWeightP, } }, itemStyle: { normal: { color: '#ddd', opacity:c_szOpacityP, borderColor:c_szLineColorP, borderWidth:c_szLineWidthP, borderType:c_szLineTypeP, shadowBlur:c_szShadowSizeP, shadowColor:c_szShadowColorP, shadowOffsetX:c_szShadowXP, shadowOffsetY:c_szShadowYP, } }, silent: true, xAxisIndex: 1, yAxisIndex: 1, barWidth: 20, barGap: '-100%', // Make series be overlap data: garybar }, { type: 'bar', label:{ normal:{ color:c_szColorP, fontSize:c_nSizeP, fontFamily:c_szFamilyP, fontStyle:c_szStyleP, fontWeight:c_szWeightP, } }, itemStyle: { normal: { color: function (params){ var colorList = colorList1; return colorList[params.dataIndex]; }, opacity:c_szOpacityP, borderColor:c_szLineColorP, borderWidth:c_szLineWidthP, borderType:c_szLineTypeP, shadowBlur:c_szShadowSizeP, shadowColor:c_szShadowColorP, shadowOffsetX:c_szShadowXP, shadowOffsetY:c_szShadowYP, } }, xAxisIndex: 1, yAxisIndex: 1, barWidth: 20, z: 10, data: data_l }, { type: 'bar', label:{ normal:{ color:c_szColorP, fontSize:c_nSizeP, fontFamily:c_szFamilyP, fontStyle:c_szStyleP, fontWeight:c_szWeightP, } }, itemStyle: { normal: { color: '#ddd', opacity:c_szOpacityP, borderColor:c_szLineColorP, borderWidth:c_szLineWidthP, borderType:c_szLineTypeP, shadowBlur:c_szShadowSizeP, shadowColor:c_szShadowColorP, shadowOffsetX:c_szShadowXP, shadowOffsetY:c_szShadowYP, } }, silent: true, barWidth: 20, barGap: '-100%', // Make series be overlap xAxisIndex: 3, yAxisIndex: 3, data: garybar }, { type: 'bar', itemStyle: { normal: { color: function (params){ var colorList = colorList2; return colorList[params.dataIndex]; }, opacity:c_szOpacityP, borderColor:c_szLineColorP, borderWidth:c_szLineWidthP, borderType:c_szLineTypeP, shadowBlur:c_szShadowSizeP, shadowColor:c_szShadowColorP, shadowOffsetX:c_szShadowXP, shadowOffsetY:c_szShadowYP, } }, label:{ normal:{ color:c_szColorP, fontSize:c_nSizeP, fontFamily:c_szFamilyP, fontStyle:c_szStyleP, fontWeight:c_szWeightP, } }, barWidth: 20, xAxisIndex: 3, yAxisIndex: 3, z: 10, data: data_r }, { type: 'bar', xAxisIndex: 5, yAxisIndex: 5, barGap: '-100%', barWidth: '25%', //统计条宽度 itemStyle: { normal: { barBorderRadius: 20, color: '#fff', opacity:c_szOpacityP, borderColor:c_szLineColorP, borderWidth:c_szLineWidthP, borderType:c_szLineTypeP, shadowBlur:c_szShadowSizeP, shadowColor:c_szShadowColorP, shadowOffsetX:c_szShadowXP, shadowOffsetY:c_szShadowYP, }, }, label: { normal: { show: true, color:c_szColorP, fontSize:c_nSizeP, fontFamily:c_szFamilyP, fontStyle:c_szStyleP, fontWeight:c_szWeightP, //label 的position位置可以是top bottom left,right,也可以是固定值 //在这里需要上下统一对齐,所以用固定值 position: [0, '-100%'], rich: { //富文本 start1: { backgroundColor: { image: uploadedDataURL1, }, width: 60, height: 60, align: 'center', }, black: { color: '#4b4b4b', lineHeight: 50, align: 'center', fontSize: 18, }, }, formatter: function(value) { //富文本固定格式{colorName|这里填你想要写的内容} return '{start1|}\n{black|' + team[0]+'}'; }, } }, data: zongjine }, { type: 'bar', xAxisIndex: 6, yAxisIndex: 6, barGap: '-100%', barWidth: '25%', //统计条宽度 itemStyle: { normal: { barBorderRadius: 20, color: '#fff', opacity:c_szOpacityP, borderColor:c_szLineColorP, borderWidth:c_szLineWidthP, borderType:c_szLineTypeP, shadowBlur:c_szShadowSizeP, shadowColor:c_szShadowColorP, shadowOffsetX:c_szShadowXP, shadowOffsetY:c_szShadowYP, }, }, label: { normal: { show: true, color:c_szColorP, fontSize:c_nSizeP, fontFamily:c_szFamilyP, fontStyle:c_szStyleP, fontWeight:c_szWeightP, //label 的position位置可以是top bottom left,right,也可以是固定值 //在这里需要上下统一对齐,所以用固定值 position: [0, '-100%'], rich: { //富文本 start1: { backgroundColor: { image: uploadedDataURL2, }, width: 60, height: 60, align: 'center', }, black: { color: '#4b4b4b', lineHeight: 50, align: 'center', fontSize: 18, }, }, formatter: function(value) { //富文本固定格式{colorName|这里填你想要写的内容} return '{start1|}\n{black|' + team[1]+'}'; }, } }, data: zongjine } ] }; myChart1.setOption(option1); // myChart1.on('click',function(e){ // if(ISWEB==0){ // if(typeof MYPOSITION=='undefined'){ // var x = axo1.indexOf(ax1[e.data[0]]); // var y = nykey1[x].indexOf(yaxis1[e.data[1]]); // external.Pos(x+'/'+y); // } // }else{ // var x = e.value[0]; // var y = e.value[1]; // var z = MD5ARR[0][x][y]; // if(z.trim()!=''){ // if(ISWEB==1){ // var n = z.indexOf('enc='); // window.open('http://www.patentics.cn/showpatent_phone.htm?sq='+z.substring(0,n)+'sencstring='+z.substring(n+4)); // } // } // } // }) isLoad = 1; }