`
shencanfeng
  • 浏览: 26039 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

js实现结构图

阅读更多
js代码:
// JavaScript Document
function $(id){return document.getElementById(id);}
function offset(node){
var x = node.offsetLeft;
var y = node.offsetTop;
var w = node.offsetWidth;
var h = node.offsetHeight;
var parent = node.offsetParent;
while (parent != null){
x += parent.offsetLeft;
y += parent.offsetTop;
parent = parent.offsetParent;
}
if(w==0){
w+=parseInt(node.currentStyle.width);
w+=parseInt(node.currentStyle.paddingRight);
w+=parseInt(node.currentStyle.paddingLeft);
w+=parseInt(node.currentStyle.borderWidth) * 2;
}
if(h==0){
h+=parseInt(node.currentStyle.height);
h+=parseInt(node.currentStyle.paddingTop);
h+=parseInt(node.currentStyle.paddingBottom);
h+=parseInt(node.currentStyle.borderWidth) * 2;
}
return {x: x, y: y, w: w, h: h};
}

function OrgNode(){
this.Text=null;
this.Link=null;
this.Description=null;
this.BoxWidth=null;
this.BoxHeight=null;
this.parentNode=null;
this.NodeGroupId=null; //同一层的级别序号,从零开始
this.NodeOrderId=null; //同一级中的序号,从零开始
this.TopLine=null;
this.BottomLine=null;
this.Depth=null;
this.Top=null;
this.Left=null;
this.Type=null;
this.Nodes=[];
this.customParam=[]; //节点自定义参数
var This=this;
this.Nodes.Add=function(OrgNode_){
OrgNode_.parentNode=This;
This.Nodes[This.Nodes.length]=OrgNode_;
}
this.Box=null;
this.Templet=null;
this.Id="OrgNode_"+ GetRandomId(20);

this.inIt= function(){
if(this.inIted==true)return;
var tempDiv=document.createElement("DIV");
document.body.appendChild(tempDiv);
var tempHTML=this.Templet;
tempHTML=tempHTML.replace("{Id}", this.Id);
tempHTML=tempHTML.replace("{Text}", this.Text);
tempHTML=(this.Link==null)?tempHTML.replace("{Link}", "JavaScript:void(0)"):tempHTML.replace("{Link}", this.Link);
tempHTML=tempHTML.replace("{Description}", this.Description);
for(var Param_ in  this.customParam){
tempHTML=tempHTML.replace("{"+ Param_ +"}", this.customParam[Param_]);
}
tempDiv.innerHTML=tempHTML;
this.Box=$(this.Id);

if(this.BoxWidth!=null){
if(offset(this.Box).w < this.BoxWidth){
this.Box.style.width=this.BoxWidth +"px";
if(offset(this.Box).w > this.BoxWidth){
this.Box.style.width=(this.BoxWidth - (offset(this.Box).w - this.BoxWidth)) +"px";
}
}
}

if(this.BoxHeight!=null){
if(offset(this.Box).h < this.BoxHeight){
this.Box.style.height=this.BoxHeight +"px";
if(offset(this.Box).h > this.BoxHeight){
this.Box.style.height=(this.BoxHeight - (offset(this.Box).h - this.BoxHeight)) +"px";
}
}
}
this.Width=offset(this.Box).w;
this.Height=offset(this.Box).h;
this.inIted=true;
}
function GetRandomId(n_){
var litter="abcdefghijklmnopqrstuvwxyz"
litter+=litter.toUpperCase()
litter+="1234567890";
var idRnd="";
for(var i=1; i<=n_; i++){
idRnd+=litter.substr((0 + Math.round(Math.random() * (litter.length - 0))), 1)
}
return idRnd;
}
}
function OrgShow(OrgNode_){
this.LineSize=2;
this.LineColor="#000000";
this.IntervalWidth=100;
this.IntervalHeight=50;
this.Top=0;
this.Left=0;
this.Depth=0;
this.Nodes=[];
this.DepthGroup=[]; //this.DepthGroup[n].Nodes 层深节点集合
//this.DepthGroup[n].NodeGroups[m]  层深节点按上层分类集合 this.DepthGroup[n].NodeGroups[m][k]层深节点
var This=this;
this.BoxWidth=null;
this.BoxHeight=null;
this.BoxTemplet=null;
this.ShowType=null;
this.Run=function(){
BoxInit(OrgNode_);
GetDepth(OrgNode_);
SetDepthsHeight()//设置层深高度

//***************************
for(var n=1; n<=this.Depth; n++){//设置顶距离
var tempTop=this.Top + GetDepthHeightToRoot(n);
var tempNodes=this.DepthGroup[n].Nodes;
for(var m=0; m<tempNodes.length; m++){
tempNodes[m].Top=tempTop;
}
}
//***************************
for(var n=this.Depth; n>=1; n--){//设置左距离
var DepthNodes=this.DepthGroup[n].Nodes;
if(n==this.Depth){
for(var m=0; m<DepthNodes.length; m++){
if(m==0){
DepthNodes[m].Left=0;
}else{
DepthNodes[m].Left=DepthNodes[m-1].Left + DepthNodes[m-1].Width + this.IntervalWidth;
}
}
}else{
for(var m=0; m<DepthNodes.length; m++){
if(DepthNodes[m].Nodes.length!=0){
var tempNodeLeft_=DepthNodes[m].Nodes[0].Left + (GetGroupWidthByNode(DepthNodes[m].Nodes[0]) / 2);
tempNodeLeft_-=(DepthNodes[m].Width / 2);
DepthNodes[m].Left = tempNodeLeft_;
}
}
for(var m=0; m<DepthNodes.length; m++){
if(DepthNodes[m].Left==null){
SetLeftByDepthNode(DepthNodes, m, "LTR");
}
}
}
}
SetDepthGroupWidth();//设置群组宽度
var MaxLeftValue=this.Nodes[0].Left;
for(var n=1; n<this.Nodes.length; n++){//取得最小左距离
if(MaxLeftValue>this.Nodes[n].Left){
MaxLeftValue=this.Nodes[n].Left;
}
}
MaxLeftValue=(-MaxLeftValue) + this.Left;
for(var n=0; n<this.Nodes.length; n++){//重新设置距离
this.Nodes[n].Left+=MaxLeftValue;
this.Nodes[n].Box.style.left=this.Nodes[n].Left + "px"
this.Nodes[n].Box.style.top=this.Nodes[n].Top + "px"
}


//***************************
for(var n=1; n<=this.Depth; n++){//设置竖线条
var tempNodes=this.DepthGroup[n].Nodes;
for(var m=0; m<tempNodes.length; m++){
if(n!=this.Depth){//设置底线条
if(tempNodes[m].Nodes.length!=0){
var tempLineLeft=tempNodes[m].Left + (tempNodes[m].Width / 2);
var tempLineHeight=((this.IntervalHeight - this.LineSize) / 2);
tempLineHeight+=(this.DepthGroup[n].Height - tempNodes[m].Height);
var tempLineTop=tempNodes[m].Top + tempNodes[m].Height;
var tempBottomLine=new CreateLine(2, tempLineTop, tempLineLeft, tempLineHeight, this.LineSize, this.LineColor, "LineBottom_"+ tempNodes[m].Id);
tempNodes[m].BottomLine=tempBottomLine.Line;
}
}
if(n!=1){//设置顶线条
var tempLineLeft=tempNodes[m].Left + (tempNodes[m].Width / 2);
var tempLineHeight=((this.IntervalHeight - this.LineSize) / 2);
var tempLineTop=tempNodes[m].Top - tempLineHeight;
if(this.DepthGroup[tempNodes[m].Depth].NodeGroups[tempNodes[m].NodeGroupId].length==1){//如果只有一个节点
var tempBottomLineHeight=parseFloat(tempNodes[m].parentNode.BottomLine.style.height) + this.LineSize;
tempNodes[m].parentNode.BottomLine.style.height=(tempLineHeight + tempBottomLineHeight)+"px";
}else{
var temptopLine=new CreateLine(2, tempLineTop, tempLineLeft, tempLineHeight, this.LineSize, this.LineColor, "LineTop_"+ tempNodes[m].Id);
tempNodes[m].TopLine=temptopLine.Line;
}
}
}
}

for(var n=2; n<=this.Depth; n++){//设置横线条
var tempNodeGroups_=this.DepthGroup[n].NodeGroups;
for(var m=0; m<tempNodeGroups_.length; m++){
if(tempNodeGroups_[m].length!=1){
var tempLineWidth=tempNodeGroups_[m].Width - (tempNodeGroups_[m][0].Width / 2) + this.LineSize;
tempLineWidth-=(tempNodeGroups_[m][tempNodeGroups_[m].length-1].Width / 2);
var tempLineTop=tempNodeGroups_[m][0].Top - ((this.IntervalHeight - this.LineSize) / 2) - this.LineSize;
var tempLineLeft=tempNodeGroups_[m][0].Left + (tempNodeGroups_[m][0].Width / 2);
var tempGroupLine=new CreateLine(1, tempLineTop, tempLineLeft, tempLineWidth, this.LineSize, this.LineColor, "LineGroup_"+ tempNodeGroups_[m][0].Id);
}
}
}

//*************************************************************************************************
}
function GetGroupWidthByNode(Node_){//根据群组中任一节点,取得群组宽度
var tempNodesGroup_=This.DepthGroup[Node_.Depth].NodeGroups[Node_.NodeGroupId];
var tempGroupWidth_=tempNodesGroup_[tempNodesGroup_.length-1].Left - tempNodesGroup_[0].Left;
tempGroupWidth_+=tempNodesGroup_[tempNodesGroup_.length-1].Width
return tempGroupWidth_;
}


function SetLeftByDepthNode(DepthNodes_, NodeId, Type){
if(Type=="LTR"&&NodeId==DepthNodes_.length-1){
SetLeftByDepthNode(DepthNodes_, NodeId, "RTL");
return;
}
if(Type=="RTL"&&NodeId==0){
SetLeftByDepthNode(DepthNodes_, NodeId, "LTR");
return;
}
var FindIndex=null;
if(Type=="LTR"){
for(var r_=NodeId+1; r_<DepthNodes_.length; r_++){
if(DepthNodes_[r_].Left!=null){
FindIndex=r_;
break;
}
}
if(FindIndex==null){
SetLeftByDepthNode(DepthNodes_, NodeId, "RTL");
return;
}else{
for(var r_=FindIndex-1; r_>=NodeId; r_--){
DepthNodes_[r_].Left=DepthNodes_[r_+1].Left - This.IntervalWidth - DepthNodes_[r_].Width;
}
}
}
if(Type=="RTL"){
for(var r_=NodeId-1; r_>=0; r_--){
if(DepthNodes_[r_].Left!=null){
FindIndex=r_;
break;
}
}
if(FindIndex==null){
SetLeftByDepthNode(DepthNodes_, NodeId, "LTR");
return;
}else{
for(var r_=FindIndex+1; r_<=NodeId; r_++){
DepthNodes_[r_].Left=DepthNodes_[r_-1].Left + This.IntervalWidth + DepthNodes_[r_-1].Width;
}
}
}
}

function GetDepthHeightToRoot(DepthId){//取得距离顶层的高度
var tempHeight_=0;
for(var x_=DepthId; x_>=1; x_--){
tempHeight_+=This.DepthGroup[x_].Height;
}
tempHeight_+=This.IntervalHeight * (DepthId - 1);
tempHeight_-=This.DepthGroup[DepthId].Height;
return tempHeight_;
}


function SetLeftPosByChildNode(Node_, ChildNode_){//根据下级节点位置设置节点位置
var tempNodeGroups=This.DepthGroup[ChildNode_.Depth].NodeGroups[ChildNode_.NodeGroupId];
var tempNodeLeft;
if(tempNodeGroups.length==1){
tempNodeLeft=((ChildNode_.Width / 2) + ChildNode_.Left) - (Node_.Width / 2);
}else{
tempNodeLeft=GetFirstLeftPos(ChildNode_) + (tempNodeGroups.Width / 2) - (Node_.Width / 2);
}
Node_.Left=tempNodeLeft;
}

function GetFirstLeftPos(Node_){//根据节点位置取得同一级中首个节点位置
if(Node_.NodeOrderId==0){//Node_为首节点
return Node_.Left;
}
var tempWidth=0;
for(var k_=0; k_<=Node_.NodeOrderId; k_++){
var tempGroupsNode=This.DepthGroup[Node_.Depth].NodeGroups[Node_.NodeGroupId][k_];
tempWidth+=tempGroupsNode.Width;
}
tempWidth+=(Node_.NodeOrderId * This.IntervalWidth);
return ((Node_.Left - tempWidth) + (Node_.Width / 2));
}

function ChildNodesWidth(OrgObj){//取得层宽
var ReWidth=0;
for(var s_=0; s_<OrgObj.Nodes.length; s_++){
ReWidth+=OrgObj.Nodes[s_].Width;
}
ReWidth+=(OrgObj.Nodes.length-1) * This.IntervalWidth;
return ReWidth;
}

function SetDepthGroupWidth(){//设置层深宽度
for(var n_=1; n_<=This.Depth; n_++){
var tempNodeGroups=This.DepthGroup[n_].NodeGroups;
for(var m_=0; m_<tempNodeGroups.length; m_++){
tempNodeGroups[m_].Width=GetGroupWidthByNode(tempNodeGroups[m_][0]);
}
}
}


function SetDepthsHeight(){//设置层深高度
for(var n_=1; n_<=This.Depth; n_++){
var tempNodes_=This.DepthGroup[n_].Nodes;
var MaxHeight=0;
for(var m_=0; m_<tempNodes_.length; m_++){
if(tempNodes_[m_].Height>MaxHeight){
MaxHeight=tempNodes_[m_].Height;
}
}
This.DepthGroup[n_].Height=MaxHeight;
}
}
function GetDepth(OrgObj){//取得层深,层群集
This.Nodes[This.Nodes.length]=OrgObj;
OrgObj.Depth=(This.Depth==0)?This.Depth+1:OrgObj.parentNode.Depth+1;
This.Depth=(OrgObj.Depth>This.Depth)?OrgObj.Depth:This.Depth;
if(typeof(This.DepthGroup[OrgObj.Depth])!="object"){
This.DepthGroup[OrgObj.Depth]=[];
This.DepthGroup[OrgObj.Depth].Nodes=[];
This.DepthGroup[OrgObj.Depth].NodeGroups=[];
}
This.DepthGroup[OrgObj.Depth].Nodes[This.DepthGroup[OrgObj.Depth].Nodes.length]=OrgObj;
if(OrgObj.Depth==1){
This.DepthGroup[OrgObj.Depth].NodeGroups[0]=[];
This.DepthGroup[OrgObj.Depth].NodeGroups[0][0]=OrgObj;
OrgObj.NodeGroupId=0;
OrgObj.NodeOrderId=0;
}else{
if(This.DepthGroup[OrgObj.Depth].NodeGroups.length==0){
This.DepthGroup[OrgObj.Depth].NodeGroups[0]=[];
This.DepthGroup[OrgObj.Depth].NodeGroups[0][0]=OrgObj;
OrgObj.NodeGroupId=0;
OrgObj.NodeOrderId=0;
}else{
var GroupsLength=This.DepthGroup[OrgObj.Depth].NodeGroups.length;
var GroupNodesLength=This.DepthGroup[OrgObj.Depth].NodeGroups[GroupsLength-1].length;
if(OrgObj.parentNode==This.DepthGroup[OrgObj.Depth].NodeGroups[GroupsLength-1][GroupNodesLength-1].parentNode){
This.DepthGroup[OrgObj.Depth].NodeGroups[GroupsLength-1][GroupNodesLength]=OrgObj;
OrgObj.NodeGroupId=GroupsLength-1;
OrgObj.NodeOrderId=GroupNodesLength;
}else{
if(typeof(This.DepthGroup[OrgObj.Depth].NodeGroups[GroupsLength])!="object"){
This.DepthGroup[OrgObj.Depth].NodeGroups[GroupsLength]=[];
}
GroupNodesLength=This.DepthGroup[OrgObj.Depth].NodeGroups[GroupsLength].length;
This.DepthGroup[OrgObj.Depth].NodeGroups[GroupsLength][GroupNodesLength]=OrgObj;
OrgObj.NodeGroupId=GroupsLength;
OrgObj.NodeOrderId=GroupNodesLength;
}
}
}

if(OrgObj.Nodes.length!=0){
for(var n=0; n<OrgObj.Nodes.length; n++){
GetDepth(OrgObj.Nodes[n]);
}
}
}
function BoxInit(OrgObj_){//节点初始化
OrgObj_.Templet=GetBoxTemplet();
OrgObj_.BoxWidth=This.BoxWidth;
OrgObj_.BoxHeight=This.BoxHeight;
OrgObj_.inIt();

if(OrgObj_.Nodes.length!=0){
for(var n=0; n<OrgObj_.Nodes.length; n++){
BoxInit(OrgObj_.Nodes[n]);
}
}
}
function GetBoxTemplet(){//取得节点模板
if(This.BoxTemplet!=null)return This.BoxTemplet;
var TempletStr="<div id=\"{Id}\" style=\"font-size:12px;padding:5px 5px 5px 5px;border:thin solid orange;background-color:lightgrey; clear:left;float:left;text-align:center;position:absolute;"
if(This.ShowType==2)TempletStr+="writing-mode: tb-rl;";
TempletStr+="\" title=\"{Description}\" ><a href=\"{Link}\">{Text}</a></div>";
return TempletStr;
}

function CreateLine(type_, top_, left_, long_, size_, color_, id_){
this.Type=type_;
top_=top_+"";
left_=left_+"";
long_=long_+"";
this.Top=(top_.substr(top_.length-2).toLowerCase()!="px")?top_+"px":top_;
this.Left=(left_.substr(left_.length-2).toLowerCase()!="px")?left_+"px":left_;
this.Long=(long_.substr(long_.length-2).toLowerCase()!="px")?long_+"px":long_;
this.Size=(size_==undefined)?"1px":size_+"";
this.Id=(id_==undefined)?null:id_;
this.Size=(this.Size.substr(this.Size.length-2).toLowerCase()!="px")?this.Size+"px":this.Size;
this.Color=(color_==undefined)?"#000000":color_;
this.Line=document.createElement("DIV");
document.body.appendChild(this.Line);
this.Line.innerText="x";
this.Line.style.position="absolute";
this.Line.style.top=this.Top;
this.Line.style.left=this.Left;
this.Line.style.overflow="hidden";
if(this.Type==1){

this.Line.style.borderTopColor=this.Color;
this.Line.style.borderTopWidth=this.Size;
this.Line.style.borderTopStyle="solid";
this.Line.style.width=this.Long;
this.Line.style.height="0px";
}else{
this.Line.style.borderLeftColor=this.Color;
this.Line.style.borderLeftWidth=this.Size;
this.Line.style.borderLeftStyle="solid";
this.Line.style.height=this.Long;
this.Line.style.width="0px";
}
if(this.Id!=null)this.Line.id=this.Id;
}
}

function makecharts(xmlDoc){
var slots=xmlDoc.getElementsByTagName("slot");

for(var i=0;i<slots.length;i++){
var s=slots[i];
checknodes[checknodes.length]={object:new OrgNode(),value:s.getElementsByTagName("slotno")[0].firstChild.data};
var bos=s.getElementsByTagName("board");
//alert(bos.length);
for(var j=0;j<bos.length;j++){
var bo=bos[j];
//alert(bo.getElementsByTagName("state")[0].firstChild.data));
checknodes1[checknodes1.length]={
objects:new OrgNode(),
boardno:getBoardText("boardno",bo.getElementsByTagName("boardno")[0].firstChild.data)+"/"+i,
boardclass:getBoardText("boardclass",bo.getElementsByTagName("boardclass")[0].firstChild.data)+"/"+i,
boardtype:getBoardText("boardtype",bo.getElementsByTagName("boardtype")[0].firstChild.data)+"/"+i,
channelnum:getBoardText("channelnum",bo.getElementsByTagName("channelnum")[0].firstChild.data)+"/"+i,
ipaddr:getBoardText("ipaddr",bo.getElementsByTagName("ipaddr")[0].firstChild.data)+"/"+i,
hasboard:getBoardText("hasboard",bo.getElementsByTagName("hasboard")[0].firstChild.data)+"/"+i,
state:getBoardText("state",bo.getElementsByTagName("state")[0].firstChild.data)+"/"+i,
prodid:getBoardText("prodid",bo.getElementsByTagName("prodid")[0].firstChild.data)+"/"+i
};
}
} //alert("length="+checknodes.length);
var a=new OrgNode();
a.customParam.EmpName="设备框图";
a.customParam.department="UC设备框图";
//alert(checknodes.length);
for(var i=0;i<checknodes.length;i++){
var ob=checknodes[i].object;
ob.customParam.EmpName="槽号:"+checknodes[i].value;
ob.customParam.department="槽号:"+checknodes[i].value;
a.Nodes.Add(ob);
for(var j=0;j<checknodes1.length;j++){
var obs=checknodes1[j].objects;
//alert(checknodes1[j].values);
var boardno=checknodes1[j].boardno.split("/");
var boardclass=checknodes1[j].boardclass.split("/");
var boardtype=checknodes1[j].boardtype.split("/");
var channelnum=checknodes1[j].channelnum.split("/");
var ipaddr=checknodes1[j].ipaddr.split("/");
var hasboard=checknodes1[j].hasboard.split("/");
var state=checknodes1[j].state.split("/");
var prodid=checknodes1[j].prodid.split("/");
if(boardno[1]==i && boardclass[1]==i && boardtype[1]==i && channelnum[1]==i && ipaddr[1]==i && hasboard[1]==i && state[1]==i && prodid[1]==i){
obs.customParam.EmpName="单板号:"+boardno[0];
var depart="";
depart+="单板号:"+boardno[0]+";";
depart+="\n单板类型:"+boardclass[0]+";";
depart+="\n单板型号:"+boardtype[0]+";";
depart+="\n通道数:"+channelnum[0]+";";
depart+="\n单板IP:"+ipaddr[0]+";";
depart+="\n是否有单板:"+hasboard[0]+";";
depart+="\n单板状态:"+state[0]+";";
depart+="\n设备出厂ID:"+prodid[0 ]+";";
obs.customParam.department=depart;
ob.Nodes.Add(obs);
}
}
    }
分享到:
评论
1 楼 lbfmin 2010-09-23  
可不可以提供一下demo或都是效果图之类的,谢谢

相关推荐

    js实现的组织结构图

    在压缩包中“js实现的组织结构图”可能是示例代码或者完整的实现,可以作为参考来学习和理解如何用JavaScript实现组织结构图。通过阅读和理解代码,你可以更好地掌握这一技术,并将其应用到自己的项目中。 总结来说...

    JavaScript实现文档结构图

    JavaScript实现文档结构图! 值得下载看看!资源免费,大家分享!!

    结构图JS版本

    本项目名为“结构图JS版本”,显然是一个使用JavaScript实现的结构图绘制工具。这个工具提供了一个简单的测试环境,适合展示两层的组织结构,同时也支持用户根据需求自由扩展以构建更复杂的层次。 首先,`domo....

    js写的结构图

    在描述中的“js写的结构图”可能指的是利用JavaScript来创建各种图表,如组织架构图、流程图、树状图或网络拓扑图等,这些图表能够清晰地展示数据和信息的层次结构。 1. **SVG与Canvas**: JavaScript通常结合HTML5...

    JS组织结构图大整合

    JS组织结构图是理解和学习JavaScript语法、对象模型以及程序设计模式的重要工具。这些图形化表示有助于开发者清晰地看到代码间的关联和流程,从而更好地管理和维护复杂的JavaScript项目。 "JS组织结构图大整合"这个...

    js 实现心电图

    在"js实现心电图"这个项目中,我们看到JavaScript被用来创建实时的心电图(ECG)和瞬时脉率图,这是一项在健康监测、健身追踪和医疗应用中非常重要的功能。 首先,`highcharts`是一个流行的JavaScript图表库,它...

    JS画组织结构图JS画组织结构图

    - 分析并学习现有的JS组织结构图实现,如GitHub上的开源项目,从中获取灵感和最佳实践。 10. **持续改进** - 用户反馈和性能监控是持续改进组织结构图的关键,以满足不断变化的需求。 通过以上步骤和知识点,...

    Javascript实现的超炫组织结构图

    Javascript实现的超炫组织结构图 支持动态效果 支持JQuery 支持JSON数据格式 支持动态填充数据 支持拖拽 支持结点展开收缩 支持变换根结点 支持结点形状变换(矩形、椭圆型、圆形、五角星等) 支持线条样式变换 支持...

    js实现折线图

    总结,JavaScript实现折线图的关键在于选择合适的库、理解数据与图形之间的映射关系以及熟悉库提供的API。通过这些基础知识,你可以创建出各种各样的折线图,并根据需求进行个性化定制。而jb51.net可能是一个教程...

    基于echart.js实现的人员架构图,企业内部组织结构图展示图.rar

    本项目“基于echart.js实现的人员架构图,企业内部组织结构图展示图”就是利用ECharts这一强大的工具来呈现企业的组织结构。 ECharts提供了多种图表类型,包括柱状图、折线图、饼图、散点图等,同时也支持自定义...

    jQuery实现公司组织结构图

    7. **插件利用**:虽然可以直接用jQuery编写组织结构图,但市场上已有许多现成的jQuery插件,如`orgchart.js`,它们提供了更丰富的功能和自定义选项。使用这些插件可以快速实现复杂的组织结构图,减少开发时间和工作...

    js DuPont 结构图

    在本场景中,我们讨论的是如何使用JavaScript实现杜邦结构图,这是一种用于展示复杂数据关系的图形化工具。杜邦结构图源自杜邦分析法,通常用于财务分析,通过层层分解,帮助理解企业的财务绩效。 杜邦结构图的核心...

    纯js实现流程图

    以上就是使用纯JavaScript实现流程图的一些核心知识点。通过熟练掌握这些技能,你就可以创建出功能丰富、交互性强的流程图应用,无论是在Web开发、项目管理还是系统设计中,都能发挥重要作用。在实际项目中,可以...

    html5结构图canvas绘制组织结构图框架代码

    Canvas通过JavaScript API提供了丰富的图形绘制功能,使得开发者无需依赖Flash或其他插件就能创建复杂的2D图形,包括组织结构图。本框架代码就是利用HTML5的Canvas元素来绘制组织结构图。 组织结构图是一种展示公司...

    js实现前端甘特图.zip

    DHTML(Dynamic HTML)是一种利用HTML、CSS和JavaScript实现动态交互效果的技术,它使得网页内容可以在不刷新整个页面的情况下更新。 首先,我们需要理解甘特图的基本原理。甘特图由一系列条形组成,每个条形代表一...

    ecoTree经典js组织结构图

    3. ECOTree.js:这是核心JavaScript库文件,包含了实现组织结构图的所有功能和逻辑。开发者可以通过引入这个文件并调用其提供的API来创建和操作组织结构图。 4. img:这个文件夹可能包含了一些图标或图片资源,用于...

    J2EE体系结构图或三层结构图

    * Flexibility:J2EE 体系结构图或三层结构图可以根据需要选择不同的技术和框架来实现,每一层可以使用不同的技术来实现。 * Scalability:J2EE 体系结构图或三层结构图可以根据需要水平扩展或垂直扩展,可以满足大...

    【JavaScript源代码】vue使用echarts画组织结构图.docx

    【JavaScript源代码】:在Vue项目中利用ECharts绘制组织结构图 在Web开发中,有时我们需要展示组织结构图,这种需求可以通过各种方法实现。在本文中,我们将探讨如何使用JavaScript库ECharts在Vue框架中绘制组织...

    使用jsTree实现js树形结构

    通过这个库,你可以轻松地创建各种复杂的树形布局,例如文件系统、组织结构图或者导航菜单等。 **一、jsTree 的基本使用** 1. **引入 jsTree** 在你的 HTML 文件中,你需要引入 jsTree 的核心 CSS 和 JavaScript ...

Global site tag (gtag.js) - Google Analytics