3d跨度振幅走势图实现--彩票类

ESUNChart={};
ESUNChart.previewCode=[];
ESUNChart.on=function(o,type,fn){o.attachEvent?o.attachEvent('on'+type,function(){fn.call(o)}):o.addEventListener(type,fn,false);};
/* 全局控制 */
ESUNChart.ini={
	default_has_line:true,
	map:[],/* 数字到字符映射 */
	initShow:'',/* 是否初始化时显示重号或者其它号码,格式为复选框ID+,号 "c_tb,c_v,c_v3,c_h,c_h3,c_x,c_x3" */
	stop_buy_re:/sina|tenpay|paipai|youa/ /* 禁止出现购买按钮的包含站点规则 */
};

ESUNChart.CSS=function(obj,v){
	var _style=obj.style;
	if (_style[v])return _style[v];  
    if (obj.currentStyle) return obj.currentStyle[v]
    if (document.defaultView && document.defaultView.getComputedStyle){ 
            v = v.replace(/([A-Z])/g,"-$1").toLowerCase();
            var s = document.defaultView.getComputedStyle(obj,""); 
            return s && s.getPropertyValue(v); 
    }
    return null; 
}
ESUNChart.stop= function(e) {
	if (e.stopPropagation) {
		e.stopPropagation();
		e.preventDefault();
	} else {
		e.cancelBubble = true;
		e.returnValue = false;
	};
};
ESUNChart.insertAfter=function(newElement,targetElement){
	var parent=targetElement.parentNode;
	if(parent.lastChild==targetElement){
		return parent.appendChild(newElement);
	}else{
		return parent.insertBefore(newElement,targetElement.nextSibling);
	};
}

/* 连线类  --------------------------------------------------------------------*/
JoinLine=function(color,size){
	this.color=color||"#000000";
	this.size=size||1;
	this.lines=[];
	this.tmpDom=null;
	this.visible=true;
    var cenbox=document.getElementById('container');//for center div
    this.box=document.body;
    if(cenbox){//兼容居中div
        this.wrap=cenbox.getElementsByTagName('DIV')[0];
        if(this.wrap){
            this.box=this.wrap
            this.wrap.style.position='relative';
        }
    };
};
JoinLine.prototype={
	show:function(yes){
		for(var i=0;i0)||((y2-y1)<0&&(x2-x1)<0))	theta=Math.PI+theta;
		var dx=Math.sin(theta),dy=Math.cos(theta),i=0;
		do{this.FFDot(x1+i*dx,y1+i*dy,this.color,this.size)}while(i++" );
		line.from=x1+","+y1;
		line.to=x2+","+y2;
		line.strokeColor=this.color;
		line.strokeWeight=this.size+"px";
		line.style.cssText="position:absolute;z-index:999;top:0;left:0";
		line.style.visibility=this.visible;
		line.coordOrigin="0,0";
		this.lines.push(line);
		this.tmpDom.appendChild(line);
	},
	nPos:function(x1, y1, x2, y2, r){
		var a = x1 - x2, b = y1 - y2;
		var c = Math.round(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)));
		var x3, y3, x4, y4;
		var _a = Math.round((a * r)/c);
		var _b = Math.round((b * r)/c);
		return [x2 + _a, y2 + _b, x1 - _a, y1 - _b]; 
	}
};

JoinLine.indent=8;

/* 过滤搜索连线操纵类 --------------------------------------------------------------------*/
LG=function(table,_x,_y,width,margin_bottom,css_name,fn_check){
	var rect={x:_x||0,y:_y||0,w:width||0,oh:margin_bottom||0};
	var trs;
    if (isIE()) {
        trs=document.getElementById(table).rows;
    } else {
        trs = (document.getElementById("table3d").getElementsByTagName("tbody"))[1] . rows; 
    }
	var row_start=rect.y<0?(trs.length+rect.y):rect.y;
	var row_end=trs.length-rect.oh;
	var col_start=rect.x<0?(trs[row_start].cells.length+rect.x):rect.x;
	var col_end=parseInt(col_start)+parseInt(rect.w);
	if(col_end>trs[row_start].cells.length)col_end=trs[row_start].cells.length;	
	if(rect.w==0)col_end=trs[row_start].cells.length;	
	this.g=[];
	//alert([row_start,row_end,col_start,col_end]);
	for(var i=row_start;i
3d跨度振幅走势图实现--彩票类_第1张图片

你可能感兴趣的:(3d跨度振幅走势图实现--彩票类)