Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
e81ab31f
I
incubator-echarts
项目概览
x649585723
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
incubator-echarts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e81ab31f
编写于
10月 29, 2014
作者:
L
lang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chord 透明度配置
上级
b7c9e111
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
31 addition
and
11 deletion
+31
-11
src/chart/chord.js
src/chart/chord.js
+29
-10
src/config.js
src/config.js
+2
-1
未找到文件。
src/chart/chord.js
浏览文件 @
e81ab31f
...
...
@@ -3,7 +3,7 @@
*
* @author pissang (https://github.com/pissang/)
*
* TODO undirected graph ?
* TODO
非Ribbon Type 支持
undirected graph ?
*/
define
(
function
(
require
)
{
...
...
@@ -145,13 +145,15 @@ define(function (require) {
});
var
multiplier
=
(
maxRadius
-
minRadius
)
/
(
max
-
min
);
mainGraph
.
eachNode
(
function
(
node
)
{
var
queryTarget
=
[
node
,
mainSerie
];
var
symbolSize
=
if
(
max
===
min
)
{
node
.
layout
.
size
=
min
;
}
else
{
node
.
layout
.
size
=
(
node
.
layout
.
size
-
min
)
*
multiplier
+
minRadius
;
}
});
}
,
this
);
}
// Do layout
...
...
@@ -194,7 +196,7 @@ define(function (require) {
}
}
this
.
_initHoverHandler
(
graphs
);
this
.
_initHoverHandler
(
series
,
graphs
);
},
_getSerieGraphFromDataMatrix
:
function
(
serie
,
ribbonType
)
{
...
...
@@ -314,7 +316,8 @@ define(function (require) {
return
graph
;
},
_initHoverHandler
:
function
(
graphs
)
{
_initHoverHandler
:
function
(
series
,
graphs
)
{
var
mainSerie
=
series
[
0
];
var
mainGraph
=
graphs
[
0
];
var
self
=
this
;
mainGraph
.
eachNode
(
function
(
node
)
{
...
...
@@ -329,7 +332,7 @@ define(function (require) {
});
for
(
var
i
=
0
;
i
<
graphs
.
length
;
i
++
)
{
graphs
[
i
].
eachEdge
(
function
(
e
)
{
e
.
shape
.
style
.
opacity
=
0.
1
;
e
.
shape
.
style
.
opacity
=
0.
05
;
e
.
shape
.
modSelf
();
});
}
...
...
@@ -342,7 +345,10 @@ define(function (require) {
if
(
n
)
{
// 节点有可能没数据被过滤掉了
for
(
var
j
=
0
;
j
<
n
.
outEdges
.
length
;
j
++
)
{
var
e
=
n
.
outEdges
[
j
];
e
.
shape
.
style
.
opacity
=
0.7
;
var
queryTarget
=
[
e
.
data
,
mainSerie
];
e
.
shape
.
style
.
opacity
=
self
.
deepQuery
(
queryTarget
,
'
itemStyle.normal.chordStyle.opacity
'
);
var
other
=
graphs
[
0
].
getNodeById
(
e
.
node2
.
id
);
if
(
other
)
{
if
(
other
.
shape
)
{
...
...
@@ -368,7 +374,10 @@ define(function (require) {
});
for
(
var
i
=
0
;
i
<
graphs
.
length
;
i
++
)
{
graphs
[
i
].
eachEdge
(
function
(
e
)
{
e
.
shape
.
style
.
opacity
=
0.7
;
var
queryTarget
=
[
e
.
data
,
mainSerie
];
e
.
shape
.
style
.
opacity
=
self
.
deepQuery
(
queryTarget
,
'
itemStyle.normal.chordStyle.opacity
'
);
e
.
shape
.
modSelf
();
});
}
...
...
@@ -600,6 +609,7 @@ define(function (require) {
else
{
color
=
this
.
getColor
(
edge
.
node2
.
id
);
}
var
queryTarget
=
[
edge
.
data
,
mainSerie
];
var
ribbon
=
new
RibbonShape
({
zlevel
:
this
.
getZlevelBase
(),
style
:
{
...
...
@@ -611,7 +621,9 @@ define(function (require) {
target0
:
t0
,
target1
:
t1
,
brushType
:
'
both
'
,
opacity
:
0.5
,
opacity
:
this
.
deepQuery
(
queryTarget
,
'
itemStyle.normal.chordStyle.opacity
'
),
color
:
color
,
lineWidth
:
ribbonStyle
.
borderWidth
,
strokeColor
:
ribbonStyle
.
borderColor
,
...
...
@@ -660,8 +672,15 @@ define(function (require) {
yEnd
:
shape2
.
position
[
1
],
cpX1
:
center
[
0
],
cpY1
:
center
[
1
],
lineWidth
:
this
.
deepQuery
(
queryTarget
,
'
itemStyle.normal.chordStyle.width
'
),
strokeColor
:
this
.
deepQuery
(
queryTarget
,
'
itemStyle.normal.chordStyle.color
'
)
lineWidth
:
this
.
deepQuery
(
queryTarget
,
'
itemStyle.normal.chordStyle.width
'
),
strokeColor
:
this
.
deepQuery
(
queryTarget
,
'
itemStyle.normal.chordStyle.color
'
),
opacity
:
this
.
deepQuery
(
queryTarget
,
'
itemStyle.normal.chordStyle.opacity
'
)
}
});
...
...
src/config.js
浏览文件 @
e81ab31f
...
...
@@ -960,7 +960,8 @@ define(function() {
color
:
'
black
'
,
/** ribbonType = true 时有效 */
borderWidth
:
1
,
borderColor
:
'
#999
'
borderColor
:
'
#999
'
,
opacity
:
0.5
}
},
emphasis
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录