flymis/WebRoot/dojojs/src/charting/vml/Axis.js
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Copyright (c) 2004-2006, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.charting.vml.Axis");
dojo.require("dojo.lang.common");
dojo.extend(dojo.charting.Axis, {
renderLines: function(
/* dojo.charting.PlotArea */plotArea,
/* dojo.charting.Plot */plot,
/* string */plane
){
// summary
// Renders any reference lines for this axis.
if(this.nodes.lines){
while(this.nodes.lines.childNodes.length > 0){
this.nodes.lines.removeChild(this.nodes.lines.childNodes[0]);
}
if(this.nodes.lines.parentNode){
this.nodes.lines.parentNode.removeChild(this.nodes.lines);
this.nodes.lines = null;
}
}
var area = plotArea.getArea();
var g = this.nodes.lines = document.createElement("div");
g.setAttribute("id", this.getId()+"-lines");
for(var i=0; i<this._labels.length; i++){
if (this._labels[i].value == this.origin){ continue; }
var v = this.getCoord(this._labels[i].value, plotArea, plot);
var l=document.createElement("v:line");
var str=document.createElement("v:stroke");
str.dashstyle="dot";
l.appendChild(str);
l.setAttribute("strokecolor", "#666");
l.setAttribute("strokeweight", "1px");
var s=l.style;
s.position="absolute";
s.top="0px";
s.left="0px";
s.antialias="false";
if(plane == "x"){
l.setAttribute("from", v+"px,"+area.top+"px");
l.setAttribute("to", v+"px,"+area.bottom+"px");
}
else if (plane == "y"){
l.setAttribute("from", area.left+"px,"+v+"px");
l.setAttribute("to", area.right+"px,"+v+"px");
}
g.appendChild(l);
}
return g; // HTMLDivElement
后面还有 210 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。