Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Five-菜鸟级
echarts
提交
66119d35
E
echarts
项目概览
Five-菜鸟级
/
echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
echarts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
66119d35
编写于
12月 12, 2019
作者:
D
deqingli
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update the remove and add node test of tree with polyline edge shape
上级
7e6ada8c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
264 addition
and
193 deletion
+264
-193
test/tree-addNode.html
test/tree-addNode.html
+94
-70
test/tree-recurrentRemoveNode.html
test/tree-recurrentRemoveNode.html
+86
-62
test/tree-removeNode.html
test/tree-removeNode.html
+84
-61
未找到文件。
test/tree-addNode.html
浏览文件 @
66119d35
...
...
@@ -25,26 +25,22 @@ under the License.
<script
src=
"lib/esl.js"
></script>
<script
src=
"lib/config.js"
></script>
<script
src=
"lib/jquery.min.js"
></script>
<script
src=
"lib/testHelper.js"
></script>
<link
rel=
"stylesheet"
href=
"lib/reset.css"
/>
</head>
<body>
<style>
html
,
body
,
#main
{
width
:
100%
;
padding
:
0
;
margin
:
0
;
height
:
100%
;
}
</style>
<div
id=
"main"
></div>
<div
id=
"main0"
></div>
<div
id=
"main1"
></div>
<script>
require
([
'
echarts
'
],
function
(
echarts
)
{
var
chart
=
echarts
.
init
(
document
.
getElementById
(
'
main
'
),
null
,
{
});
window
.
onresize
=
function
()
{
chart
.
resize
();
chart0
.
resize
();
chart1
.
resize
();
};
var
data
=
{
...
...
@@ -84,76 +80,104 @@ under the License.
]
};
chart
.
setOption
({
tooltip
:
{
trigger
:
'
item
'
,
triggerOn
:
'
mousemove
'
},
legend
:
{
top
:
'
2%
'
,
left
:
'
3%
'
,
orient
:
'
vertical
'
,
data
:
[{
name
:
'
tree1
'
,
icon
:
'
rectangle
'
}],
borderColor
:
'
#c23531
'
},
series
:[
{
type
:
'
tree
'
,
id
:
'
2
'
,
name
:
'
tree1
'
,
data
:
[
data
],
// Used to test when the data is null whether it is work well.
// data: [],
top
:
'
20%
'
,
left
:
'
30%
'
,
bottom
:
'
22%
'
,
right
:
'
20%
'
,
roam
:
true
,
symbolSize
:
15
,
orient
:
'
RL
'
,
label
:
{
position
:
'
right
'
,
verticalAlign
:
'
middle
'
,
align
:
'
left
'
,
formatter
:
'
{b}: {c}
'
},
leaves
:
{
function
getOption
(
edgeShape
,
id
)
{
return
{
tooltip
:
{
trigger
:
'
item
'
,
triggerOn
:
'
mousemove
'
},
legend
:
{
top
:
'
2%
'
,
left
:
'
3%
'
,
orient
:
'
vertical
'
,
data
:
[{
name
:
'
tree1
'
,
icon
:
'
rectangle
'
}],
borderColor
:
'
#c23531
'
},
series
:[
{
type
:
'
tree
'
,
id
:
id
,
name
:
'
tree1
'
,
data
:
[
data
],
// Used to test when the data is null whether it is work well.
// data: [],
top
:
'
20%
'
,
left
:
'
30%
'
,
bottom
:
'
22%
'
,
right
:
'
20%
'
,
roam
:
true
,
edgeShape
:
edgeShape
,
symbolSize
:
15
,
orient
:
'
RL
'
,
label
:
{
position
:
'
lef
t
'
,
position
:
'
righ
t
'
,
verticalAlign
:
'
middle
'
,
align
:
'
right
'
,
formatter
:
function
(
params
)
{
return
params
.
data
.
name
+
params
.
dataIndex
;
align
:
'
left
'
,
formatter
:
'
{b}: {c}
'
},
leaves
:
{
label
:
{
position
:
'
left
'
,
verticalAlign
:
'
middle
'
,
align
:
'
right
'
,
formatter
:
function
(
params
)
{
return
params
.
data
.
name
+
params
.
dataIndex
;
}
}
}
},
},
expandAndCollapse
:
true
,
animationDuration
:
550
,
animationDurationUpdate
:
750
}
]
}
}
var
chart0
=
testHelper
.
create
(
echarts
,
'
main0
'
,
{
title
:
[
'
[edgeShape: **curve**]
'
],
option
:
getOption
(
'
curve
'
,
'
0
'
),
height
:
500
});
expandAndCollapse
:
true
,
animationDuration
:
550
,
animationDurationUpdate
:
750
}
]
var
chart1
=
testHelper
.
create
(
echarts
,
'
main1
'
,
{
title
:
[
'
[edgeShape: **polyline**]
'
],
option
:
getOption
(
'
polyline
'
,
'
1
'
),
height
:
500
});
setTimeout
(
function
()
{
var
cloneData
=
echarts
.
util
.
clone
(
data
);
var
appendNode
=
cloneData
.
children
[
1
].
children
.
splice
(
2
,
1
);
cloneData
.
children
.
push
(
appendNode
[
0
]);
chart
.
setOption
({
chart0
.
setOption
({
series
:
[{
type
:
'
tree
'
,
id
:
'
0
'
,
data
:
[
cloneData
]
}]
},
false
);
chart1
.
setOption
({
series
:
[{
type
:
'
tree
'
,
id
:
'
2
'
,
id
:
'
1
'
,
data
:
[
cloneData
]
}]
},
false
);
...
...
test/tree-recurrentRemoveNode.html
浏览文件 @
66119d35
...
...
@@ -25,26 +25,22 @@ under the License.
<script
src=
"lib/esl.js"
></script>
<script
src=
"lib/config.js"
></script>
<script
src=
"lib/jquery.min.js"
></script>
<script
src=
"lib/testHelper.js"
></script>
<link
rel=
"stylesheet"
href=
"lib/reset.css"
/>
</head>
<body>
<style>
html
,
body
,
#main
{
width
:
100%
;
padding
:
0
;
margin
:
0
;
height
:
100%
;
}
</style>
<div
id=
"main"
></div>
<div
id=
"main0"
></div>
<div
id=
"main1"
></div>
<script>
require
([
'
echarts
'
],
function
(
echarts
)
{
var
chart
=
echarts
.
init
(
document
.
getElementById
(
'
main
'
),
null
,
{
});
window
.
onresize
=
function
()
{
chart
.
resize
();
chart0
.
resize
();
chart1
.
resize
();
};
var
data
=
{
...
...
@@ -80,72 +76,100 @@ under the License.
]
};
chart
.
setOption
({
tooltip
:
{
trigger
:
'
item
'
,
triggerOn
:
'
mousemove
'
},
legend
:
{
top
:
'
2%
'
,
left
:
'
3%
'
,
orient
:
'
vertical
'
,
data
:
[{
name
:
'
tree1
'
,
icon
:
'
rectangle
'
}],
borderColor
:
'
#c23531
'
},
series
:[
{
type
:
'
tree
'
,
id
:
'
2
'
,
name
:
'
tree1
'
,
data
:
[
data
],
function
getOption
(
edgeShape
,
id
)
{
return
{
tooltip
:
{
trigger
:
'
item
'
,
triggerOn
:
'
mousemove
'
},
top
:
'
20%
'
,
left
:
'
30%
'
,
bottom
:
'
22%
'
,
right
:
'
20%
'
,
legend
:
{
top
:
'
2%
'
,
left
:
'
3%
'
,
orient
:
'
vertical
'
,
data
:
[{
name
:
'
tree1
'
,
icon
:
'
rectangle
'
}],
borderColor
:
'
#c23531
'
},
series
:[
{
type
:
'
tree
'
,
id
:
id
,
name
:
'
tree1
'
,
data
:
[
data
],
top
:
'
20%
'
,
left
:
'
30%
'
,
bottom
:
'
22%
'
,
right
:
'
20%
'
,
symbolSize
:
7
,
orient
:
'
RL
'
,
symbolSize
:
7
,
orient
:
'
RL
'
,
label
:
{
position
:
'
right
'
,
verticalAlign
:
'
middle
'
,
align
:
'
left
'
},
edgeShape
:
edgeShape
,
leaves
:
{
label
:
{
position
:
'
left
'
,
verticalAlign
:
'
middle
'
,
align
:
'
right
'
}
},
expandAndCollapse
:
true
,
animationDuration
:
550
,
animationDurationUpdate
:
750
}
]
position
:
'
right
'
,
verticalAlign
:
'
middle
'
,
align
:
'
left
'
},
leaves
:
{
label
:
{
position
:
'
left
'
,
verticalAlign
:
'
middle
'
,
align
:
'
right
'
}
},
expandAndCollapse
:
true
,
animationDuration
:
550
,
animationDurationUpdate
:
750
}
]
}
}
var
chart0
=
testHelper
.
create
(
echarts
,
'
main0
'
,
{
title
:
[
'
[edgeShape: **curve**]
'
],
option
:
getOption
(
'
curve
'
,
'
0
'
),
height
:
500
});
var
chart1
=
testHelper
.
create
(
echarts
,
'
main1
'
,
{
title
:
[
'
[edgeShape: **polyline**]
'
],
option
:
getOption
(
'
polyline
'
,
'
1
'
),
height
:
500
});
var
cloneData
=
echarts
.
util
.
clone
(
data
);
setInterval
(
function
()
{
cloneData
.
children
[
1
].
children
.
splice
(
0
,
1
);
chart
.
setOption
({
chart0
.
setOption
({
series
:
[{
type
:
'
tree
'
,
id
:
'
0
'
,
data
:
[
cloneData
]
}]
},
false
);
chart1
.
setOption
({
series
:
[{
type
:
'
tree
'
,
id
:
'
2
'
,
id
:
'
1
'
,
data
:
[
cloneData
]
}]
},
false
);
},
1000
);
});
</script>
</body>
...
...
test/tree-removeNode.html
浏览文件 @
66119d35
...
...
@@ -25,26 +25,22 @@ under the License.
<script
src=
"lib/esl.js"
></script>
<script
src=
"lib/config.js"
></script>
<script
src=
"lib/jquery.min.js"
></script>
<script
src=
"lib/testHelper.js"
></script>
<link
rel=
"stylesheet"
href=
"lib/reset.css"
/>
</head>
<body>
<style>
html
,
body
,
#main
{
width
:
100%
;
padding
:
0
;
margin
:
0
;
height
:
100%
;
}
</style>
<div
id=
"main"
></div>
<div
id=
"main0"
></div>
<div
id=
"main1"
></div>
<script>
require
([
'
echarts
'
],
function
(
echarts
)
{
var
chart
=
echarts
.
init
(
document
.
getElementById
(
'
main
'
),
null
,
{
});
window
.
onresize
=
function
()
{
chart
.
resize
();
chart0
.
resize
();
chart1
.
resize
();
};
var
data
=
{
...
...
@@ -80,67 +76,94 @@ under the License.
]
};
chart
.
setOption
({
tooltip
:
{
trigger
:
'
item
'
,
triggerOn
:
'
mousemove
'
},
legend
:
{
top
:
'
2%
'
,
left
:
'
3%
'
,
orient
:
'
vertical
'
,
data
:
[{
name
:
'
tree1
'
,
icon
:
'
rectangle
'
}],
borderColor
:
'
#c23531
'
},
series
:[
{
type
:
'
tree
'
,
id
:
'
2
'
,
name
:
'
tree1
'
,
data
:
[
data
],
function
getOption
(
edgeShape
,
id
)
{
return
{
tooltip
:
{
trigger
:
'
item
'
,
triggerOn
:
'
mousemove
'
},
legend
:
{
top
:
'
2%
'
,
left
:
'
3%
'
,
orient
:
'
vertical
'
,
data
:
[{
name
:
'
tree1
'
,
icon
:
'
rectangle
'
}],
borderColor
:
'
#c23531
'
},
top
:
'
20%
'
,
left
:
'
30%
'
,
bottom
:
'
22%
'
,
right
:
'
20%
'
,
series
:[
{
type
:
'
tree
'
,
id
:
id
,
name
:
'
tree1
'
,
data
:
[
data
],
symbolSize
:
7
,
orient
:
'
RL
'
,
top
:
'
20%
'
,
left
:
'
30%
'
,
bottom
:
'
22%
'
,
right
:
'
20%
'
,
label
:
{
position
:
'
right
'
,
verticalAlign
:
'
middle
'
,
align
:
'
left
'
},
symbolSize
:
7
,
orient
:
'
RL
'
,
edgeShape
:
edgeShape
,
leaves
:
{
label
:
{
position
:
'
left
'
,
verticalAlign
:
'
middle
'
,
align
:
'
right
'
}
},
expandAndCollapse
:
true
,
animationDuration
:
550
,
animationDurationUpdate
:
750
}
]
position
:
'
right
'
,
verticalAlign
:
'
middle
'
,
align
:
'
left
'
},
leaves
:
{
label
:
{
position
:
'
left
'
,
verticalAlign
:
'
middle
'
,
align
:
'
right
'
}
},
expandAndCollapse
:
true
,
animationDuration
:
550
,
animationDurationUpdate
:
750
}
]
}
}
var
chart0
=
testHelper
.
create
(
echarts
,
'
main0
'
,
{
title
:
[
'
[edgeShape: **curve**]
'
],
option
:
getOption
(
'
curve
'
,
'
0
'
),
height
:
500
});
var
chart1
=
testHelper
.
create
(
echarts
,
'
main1
'
,
{
title
:
[
'
[edgeShape: **polyline**]
'
],
option
:
getOption
(
'
polyline
'
,
'
1
'
),
height
:
500
});
setTimeout
(
function
()
{
var
cloneData
=
echarts
.
util
.
clone
(
data
);
cloneData
.
children
.
splice
(
0
,
1
);
chart
.
setOption
({
chart0
.
setOption
({
series
:
[{
type
:
'
tree
'
,
id
:
'
0
'
,
data
:
[
cloneData
]
}]
},
false
);
chart1
.
setOption
({
series
:
[{
type
:
'
tree
'
,
id
:
'
2
'
,
id
:
'
1
'
,
data
:
[
cloneData
]
}]
},
false
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录