⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pillarcompare.htc

📁 HTC,demo WEB用于。 超大型
💻 HTC
📖 第 1 页 / 共 2 页
字号:
				if(booleanSingleExtrusionColor){//使用单色填充
					if(parseFloat(oItemNodesList[i].childNodes[1].text) == 0){
						vmlPillar += "<v:rect title='" + oItemNodesList[i].childNodes[0].text + "  " + oItemNodesList[i].childNodes[1].text + "' style='position:absolute;left:" + (650 + (spaceValue + (pillarWidth + spaceValue)*i)) + "px;top:" + (1430 + vTopDistance) + "px;width:" + pillarWidth + "px;height:1px;z-index:4' fillcolor='" + objPillarColorArray[i] + "'><v:fill color2='white' rotate='t' angle='-180' type='gradient'/><o:extrusion v:ext='view' backdepth='" + vExtrusiondepth + "' color='" + vExtrusionColor + "' skewangle='230' on='t'/></v:rect>";
					}else if(!isNaN(parseFloat(oItemNodesList[i].childNodes[1].text)) && parseFloat(oItemNodesList[i].childNodes[1].text) < 0){//小于0
						vmlPillar += "<v:rect title='" + oItemNodesList[i].childNodes[0].text + "  " + oItemNodesList[i].childNodes[1].text + "' style='position:absolute;left:" + (650 + (spaceValue + (pillarWidth + spaceValue)*i)) + "px;top:" + (2400 - 1000 + vTopDistance) + "px;width:" + pillarWidth + "px;height:" + ((Math.abs(parseFloat(oItemNodesList[i].childNodes[1].text)))*1000/maxValue) + "px;z-index:1' fillcolor='" + objPillarColorArray[i] + "'><v:fill color2='" + vFillColor2 + "' rotate='t' angle='-180' type='gradient'/><o:extrusion v:ext='view' backdepth='" + vExtrusiondepth + "' color='black' skewangle='210' on='t'/></v:rect>";
					}else if(!isNaN(parseFloat(oItemNodesList[i].childNodes[1].text)) && parseFloat(oItemNodesList[i].childNodes[1].text) > 0){//大于0
						vmlPillar += "<v:rect title='" + oItemNodesList[i].childNodes[0].text + "  " + oItemNodesList[i].childNodes[1].text + "' style='position:absolute;left:" + (650 + (spaceValue + (pillarWidth + spaceValue)*i)) + "px;top:" + (2400 - (1000/maxValue)*parseFloat(oItemNodesList[i].childNodes[1].text) - 1000 + vTopDistance) + "px;width:" + pillarWidth + "px;height:" + ((parseFloat(oItemNodesList[i].childNodes[1].text))*1000/maxValue + 30) + "px;z-index:3' fillcolor='" + objPillarColorArray[i] + "'><v:fill color2='" + vFillColor2 + "' rotate='t' angle='-180' type='gradient'/><o:extrusion v:ext='view' backdepth='" + vExtrusiondepth + "' color='black' skewangle='210' on='t'/></v:rect>";
					}else{//非数值
						vmlPillar += "<v:rect title='" + oItemNodesList[i].childNodes[0].text + "  " + oItemNodesList[i].childNodes[1].text + "(非法数值...)" + "' style='position:absolute;left:" + (650 + (spaceValue + (pillarWidth + spaceValue)*i)) + "px;top:" + (1430 + vTopDistance) + "px;width:" + pillarWidth + "px;height:1px;z-index:4' fillcolor='red'><v:fill color2='red' rotate='t' angle='-180' type='gradient'/><o:extrusion v:ext='view' backdepth='" + vExtrusiondepth + "' color='red' skewangle='230' on='t'/></v:rect>";
					}
					
					//图例		
					if(booleanHasLegend){
						if(i<16){
							vmlLegend += "<v:shape style='position:absolute;left:3900px;top:" + (300 + i*130 + vTopDistance) + "px;width:1200px;height:100px;z-index:1'><div style='padding-left:5;font-size:12px;' title='" + oItemNodesList[i].childNodes[0].text + "'>" + oItemNodesList[i].childNodes[0].text + "(" + oItemNodesList[i].childNodes[1].text + ")</div></v:shape><v:rect title='" + oItemNodesList[i].childNodes[0].text + "' style='left:3700px;top:" + (320 + i*130 + vTopDistance) + "px;width:120px;height:60px;z-index:1;' fillcolor='" + objPillarColorArray[i] + "' strokecolor='black'><v:fill color2='" + vFillColor2 + "' rotate='t' type='gradient'/><o:extrusion v:ext='view' backdepth='3' color='black' on='t'/></v:rect>";
						}else{
							vmlLegend += "<v:shape style='position:absolute;left:" + (3900 + 1200) + "px;top:" + (300 + (i-16)*130 + vTopDistance) + "px;width:1200px;height:100px;z-index:1'><div style='padding-left:5;font-size:12px;' title='" + oItemNodesList[i].childNodes[0].text + "'>" + oItemNodesList[i].childNodes[0].text + "(" + oItemNodesList[i].childNodes[1].text + ")</div></v:shape><v:rect title='" + oItemNodesList[i].childNodes[0].text + "' style='left:" + (3700 + 1200) + "px;top:" + (320 + (i-16)*130 + vTopDistance) + "px;width:120px;height:60px;z-index:1;' fillcolor='" + objPillarColorArray[i] + "' strokecolor='black'><v:fill color2='" + vFillColor2 + "' rotate='t' type='gradient'/><o:extrusion v:ext='view' backdepth='3' color='black' on='t'/></v:rect>";
						}			
					}
				
				}else{//使用预置色填充(默认)
					if(parseFloat(oItemNodesList[i].childNodes[1].text) == 0){
						vmlPillar += "<v:rect title='" + oItemNodesList[i].childNodes[0].text + "  " + oItemNodesList[i].childNodes[1].text + "' style='position:absolute;left:" + (650 + (spaceValue + (pillarWidth + spaceValue)*i)) + "px;top:" + (1430 + vTopDistance) + "px;width:" + pillarWidth + "px;height:1px;z-index:4' fillcolor='" + objPillarColorArray[i] + "'><v:fill color2='white' rotate='t' angle='-180' type='gradient'/><o:extrusion v:ext='view' backdepth='" + vExtrusiondepth + "' color='" + vExtrusionColor + "' skewangle='230' on='t'/></v:rect>";
					}else if(!isNaN(parseFloat(oItemNodesList[i].childNodes[1].text)) && parseFloat(oItemNodesList[i].childNodes[1].text) < 0){//小于0
						vmlPillar += "<v:rect title='" + oItemNodesList[i].childNodes[0].text + "  " + oItemNodesList[i].childNodes[1].text + "' style='position:absolute;left:" + (650 + (spaceValue + (pillarWidth + spaceValue)*i)) + "px;top:" + (2400 - 1000 + vTopDistance) + "px;width:" + pillarWidth + "px;height:" + ((Math.abs(parseFloat(oItemNodesList[i].childNodes[1].text)))*1000/maxValue) + "px;z-index:1' fillcolor='" + objPillarColorArray[i] + "'><v:fill color2='" + vFillColor2 + "' rotate='t' angle='-180' type='gradient'/><o:extrusion v:ext='view' backdepth='" + vExtrusiondepth + "' color='" + objPillarColorArray[i] + "' skewangle='210' on='t'/></v:rect>";
					}else if(!isNaN(parseFloat(oItemNodesList[i].childNodes[1].text)) && parseFloat(oItemNodesList[i].childNodes[1].text) > 0){//大于0
						vmlPillar += "<v:rect title='" + oItemNodesList[i].childNodes[0].text + "  " + oItemNodesList[i].childNodes[1].text + "' style='position:absolute;left:" + (650 + (spaceValue + (pillarWidth + spaceValue)*i)) + "px;top:" + (2400 - (1000/maxValue)*parseFloat(oItemNodesList[i].childNodes[1].text) - 1000 + vTopDistance) + "px;width:" + pillarWidth + "px;height:" + ((parseFloat(oItemNodesList[i].childNodes[1].text))*1000/maxValue + 30) + "px;z-index:3' fillcolor='" + objPillarColorArray[i] + "'><v:fill color2='" + vFillColor2 + "' rotate='t' angle='-180' type='gradient'/><o:extrusion v:ext='view' backdepth='" + vExtrusiondepth + "' color='" + objPillarColorArray[i] + "' skewangle='210' on='t'/></v:rect>";
					}else{//非数值
						vmlPillar += "<v:rect title='" + oItemNodesList[i].childNodes[0].text + "  " + oItemNodesList[i].childNodes[1].text + " (非法数值...)" + "' style='position:absolute;left:" + (650 + (spaceValue + (pillarWidth + spaceValue)*i)) + "px;top:" + (1430 + vTopDistance) + "px;width:" + pillarWidth + "px;height:1px;z-index:4' fillcolor='red'><v:fill color2='red' rotate='t' angle='-180' type='gradient'/><o:extrusion v:ext='view' backdepth='" + vExtrusiondepth + "' color='red' skewangle='230' on='t'/></v:rect>";
					}
					
					//图例	
					if(booleanHasLegend){	
						if(i<16){
							vmlLegend += "<v:shape style='position:absolute;left:3900px;top:" + (300 + i*130 + vTopDistance) + "px;width:900px;height:100px;z-index:1'><div style='padding-left:5;font-size:12px;' title='" + oItemNodesList[i].childNodes[0].text + "'>" + oItemNodesList[i].childNodes[0].text + "(" + oItemNodesList[i].childNodes[1].text + ")</div></v:shape><v:rect title='" + oItemNodesList[i].childNodes[0].text + "' style='left:3700px;top:" + (320 + i*130 + vTopDistance) + "px;width:120px;height:60px;z-index:1;' fillcolor='" + objPillarColorArray[i] + "' strokecolor='black'><v:fill color2='" + vFillColor2 + "' rotate='t' type='gradient'/><o:extrusion v:ext='view' backdepth='3' color='" + objPillarColorArray[i] + "' on='t'/></v:rect>";
						}else{
							vmlLegend += "<v:shape style='position:absolute;left:" + (3900 + 1200) + "px;top:" + (300 + (i-16)*130 + vTopDistance) + "px;width:900px;height:100px;z-index:1'><div style='padding-left:5;font-size:12px;' title='" + oItemNodesList[i].childNodes[0].text + "'>" + oItemNodesList[i].childNodes[0].text + "(" + oItemNodesList[i].childNodes[1].text + ")</div></v:shape><v:rect title='" + oItemNodesList[i].childNodes[0].text + "' style='left:" + (3700 + 1200) + "px;top:" + (320 + (i-16)*130 + vTopDistance) + "px;width:120px;height:60px;z-index:1;' fillcolor='" + objPillarColorArray[i] + "' strokecolor='black'><v:fill color2='" + vFillColor2 + "' rotate='t' type='gradient'/><o:extrusion v:ext='view' backdepth='3' color='" + objPillarColorArray[i] + "' on='t'/></v:rect>";
						}
					}
				}//End of if(booleanSingleExtrusionColor)
			}//End of if(vPsStyle == "2")
		}//End of for
		vmlEnd = "<v:group id='" + vTagID + "' style='position:absolute;background:" + vBackColor + ";top:" + vTop + "px;left:" + vLeft + "px;width:" + vWidth + "px;height:" + vHeight + "px;' coordsize='2000,2000'>" + vmlTitle + vmlExtendCoordinate + vmlPillar + vmlLegend + "</v:group>";
		objContainerDiv.insertAdjacentHTML("afterBegin",vmlEnd);
	}catch(e){}
}


////////////////////////////////////////////////////////////////////////////////
function putXMLSource(argXMLSource){
	var oItemNode;
	var objGlobal;
	
	try{
		objGlobal = __objGlobalCommonInst;		
	}catch(e){}
	try{
		if(!objGlobal){
			objGlobal = parent.__objGlobalCommonInst;
		}
	}catch(e){}
	
	if(!objGlobal){
		objGlobal = parent.parent.__objGlobalCommonInst;
	}
	objXMLDoc = objGlobal.inputXML(argXMLSource);	
	oItemNode = objXMLDoc.selectNodes("//root/item");
	maxValue = 0;
	illnessCnt = oItemNode.length;//柱图个数
	if(illnessCnt < 4){
		spaceValue = 400;
	}else{
		spaceValue = 150;
	}
	pillarWidth = Math.ceil((2650 - spaceValue*(illnessCnt + 1))/illnessCnt);
	for(var i=0;i<illnessCnt;i++){//计算最大数
		if(!isNaN(parseFloat(oItemNode[i].childNodes[1].text))){
			maxValue = Math.max(Math.abs(parseFloat(oItemNode[i].childNodes[1].text)),maxValue);
		}
	}
}

function putLeft(argLeft){
	if(argLeft.match(/^[0-9]*$/) != null){
		vLeft = argLeft;
	}
}

function getLeft(){
	return vLeft;
}

function putTop(argTop){
	if(argTop.match(/^[0-9]*$/) != null){
		vTop = argTop;
	}
}

function getTop(){
	return vTop;
}

function putWidth(argWidth){
	if(argWidth.match(/^[0-9]*$/) != null){
		vWidth = argWidth;
	}
}

function getWidth(){
	return vWidth;
}

function putHeight(argHeight){
	if(argHeight.match(/^[0-9]*$/) != null){
		vHeight = argHeight;
	}
}

function getHeight(){
	return vHeight;
}

function putCaption(argCaption){
	vCaption = argCaption;
}

function putExtrusionColor(argExtrusionColor){
	vExtrusionColor = argExtrusionColor;
}

function putTagID(argTagID){
	vTagID = argTagID;
}

function putExtrusionDepth(argExtrusionDepth){
	if(argExtrusionDepth.match(/^[0-9]*$/) != null){
		vExtrusiondepth = argExtrusionDepth;
	}
}

function putExtrusionSingleColor(argExtrusionSingleColor){
	if(argExtrusionSingleColor == "yes"){
		booleanSingleExtrusionColor = true;
	}else{
		booleanSingleExtrusionColor = false;
	}
}

function putHasBorder(argHasBorder){
	if(argHasBorder == "no"){
		booleanHasBorder = false;
	}else if(argHasBorder == "yes"){
		booleanHasBorder = true;
	}
}

function putHasLegend(argHasLegend){
	if(argHasLegend == "no"){
		booleanHasLegend = false;
	}else if(argHasLegend == "yes"){
		booleanHasLegend = true;
	}
}

function putBorderColor(argBorderColor){
	vBorderColor = argBorderColor;
}

function putBorderWeight(argBorderWeight){
	if(argBorderWeight.match(/^[0-9]*$/) != null){
		vBorderWeight = parseInt(argBorderWeight);
	}
}

function putBackColor(argBackColor){
	vBackColor = argBackColor;
}

function putExtendCoordinateBackColor(argExtendCoordinateBackColor){
	vExtendCoordinateBackColor = argExtendCoordinateBackColor;
}

function putExtendCoordinateBaseColor(argExtendCoordinateBaseColor){
	vExtendCoordinateBaseColor = argExtendCoordinateBaseColor;
}

function putExtendCoordinateLineColor(argExtendCoordinateLineColor){
	vExtendCoordinateLineColor = argExtendCoordinateLineColor;
}

function putPsStyle(argPsStyle){
	vPsStyle = argPsStyle;
}

function putYScaleIsInteger(argYScaleIsInteger){
	if(argYScaleIsInteger == "yes"){
		booleanYScaleIsInteger = true;
	}else if(argYScaleIsInteger == "no"){
		booleanYScaleIsInteger = false;
	}
}
//-->
	</script>
</public:component>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -