rem:  this.nodes.main = document.createElementNS(dojo.svg.xmlns.svg, "g"); var g = this.nodes.main; g.setAttribute("id", this.getId()); var line = this.nodes.axis = document.createElementNS(dojo.svg.xmlns.svg, "line"); if(plane == "x"){ line.setAttribute("y1", coord); line.setAttribute("y2", coord); line.setAttribute("x1", area.left-stroke); line.setAttribute("x2", area.right+stroke); line.setAttribute("style", style); 
add:  this.nodes.main = document.createElementNS(dojo.svg.xmlns.svg, "g"); var g = this.nodes.main; g.setAttribute("id", this.getId()); var line = this.nodes.axis = document.createElementNS(dojo.svg.xmlns.svg, "line"); if(plane == "x"){ line.setAttribute("y1", coord); line.setAttribute("y2", coord); line.setAttribute("x1", area.left-stroke); line.setAttribute("x2", area.right+stroke); line.setAttribute("style", style); 
context: 	render: function(		/* dojo.charting.PlotArea */plotArea, 		/* dojo.charting.Plot */plot,		/* dojo.charting.Axis */drawAgainst,		/* string */plane	){		//	summary		//	Renders this axis to the given plot.				//	get the origin plot point.		var area = plotArea.getArea();		var stroke = 1;		var style = "stroke:#000;stroke-width:"+stroke+"px;";		var textSize=10;		var coord = drawAgainst.getCoord(this.origin, plotArea, plot);		//	draw the axis.		this.nodes.main = document.createElementNS(dojo.svg.xmlns.svg, "g");		var g = this.nodes.main;		g.setAttribute("id", this.getId());	//	need a handle if we have to kill parts of the axis def.		var line = this.nodes.axis = document.createElementNS(dojo.svg.xmlns.svg, "line");		if(plane == "x"){			line.setAttribute("y1", coord);			line.setAttribute("y2", coord);			line.setAttribute("x1", area.left-stroke);			line.setAttribute("x2", area.right+stroke);			line.setAttribute("style", style);			//	set up the labels			var y = coord+textSize+2;			if(this.showLines){				g.appendChild(this.renderLines(plotArea, plot, plane, y));			}			if(this.showTicks){				g.appendChild(this.renderTicks(plotArea, plot, plane, coord));			}			if(this.showLabels){				g.appendChild(this.renderLabels(plotArea, plot, plane, y, textSize, "middle"));			}			if(this.showLabel && this.label){				var x = plotArea.size.width/2;				var text = document.createElementNS(dojo.svg.xmlns.svg, "text");				text.setAttribute("x", x);				text.setAttribute("y", (coord + (textSize*2) + (textSize/2)));				text.setAttribute("style", "text-anchor:middle;font-family:sans-serif;font-weight:bold;font-size:"+(textSize+2)+"px;fill:#000;");				text.appendChild(document.createTextNode(this.label));				g.appendChild(text);			}		} else {			line.setAttribute("x1", coord);			line.setAttribute("x2", coord);			line.setAttribute("y1", area.top);			line.setAttribute("y2", area.bottom);			line.setAttribute("style", style);			//	set up the labels			var isMax = this.origin == drawAgainst.range.upper;			var x = coord + (isMax?4:-4);			var anchor = isMax?"start":"end";			if(this.showLines){				g.appendChild(this.renderLines(plotArea, plot, plane, x));			}			if(this.showTicks){				g.appendChild(this.renderTicks(plotArea, plot, plane, coord));			}			if(this.showLabels){				g.appendChild(this.renderLabels(plotArea, plot, plane, x, textSize, anchor));			}			if(this.showLabel && this.label){				var x = isMax?(coord+(textSize*2)+(textSize/2)):(coord-(textSize*4));				var y = plotArea.size.height / 2;				var text = document.createElementNS(dojo.svg.xmlns.svg, "text");				text.setAttribute("x", x);				text.setAttribute("y", y);				text.setAttribute("transform", "rotate(90, " + x + ", " + y + ")");				text.setAttribute("style", "text-anchor:middle;font-family:sans-serif;font-weight:bold;font-size:"+(textSize+2)+"px;fill:#000;");				text.appendChild(document.createTextNode(this.label));				g.appendChild(text);			}		}		g.appendChild(line);		return g;	// 	SVGGElement	}
meta: 4707	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4707/50c3492c4c3c825dbd3401e134a19ed46799c456/Axis.js/buggy/www/resources/dojo-ajax/src/charting/svg/Axis.js