Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
missman
incubator-echarts
提交
5a1bced3
I
incubator-echarts
项目概览
missman
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
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,发现更多精彩内容 >>
提交
5a1bced3
编写于
1月 09, 2018
作者:
O
Ovilia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(sunburst): remove normal
上级
e7888ee4
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
177 addition
and
473 deletion
+177
-473
src/chart/sunburst/SunburstPiece.js
src/chart/sunburst/SunburstPiece.js
+4
-4
src/chart/sunburst/SunburstSeries.js
src/chart/sunburst/SunburstSeries.js
+11
-15
test/sunburst-book.html
test/sunburst-book.html
+26
-58
test/sunburst-drink.html
test/sunburst-drink.html
+117
-347
test/sunburst-simple.html
test/sunburst-simple.html
+3
-9
test/sunburst-visualMap.html
test/sunburst-visualMap.html
+2
-6
test/sunburst.html
test/sunburst.html
+14
-34
未找到文件。
src/chart/sunburst/SunburstPiece.js
浏览文件 @
5a1bced3
...
...
@@ -25,7 +25,7 @@ function SunburstPiece(node, seriesModel, ecModel) {
});
var
text
=
new
graphic
.
Text
({
z2
:
DEFAULT_TEXT_Z
,
silent
:
node
.
getModel
(
'
label
.normal
'
).
get
(
'
silent
'
)
silent
:
node
.
getModel
(
'
label
'
).
get
(
'
silent
'
)
});
this
.
add
(
sector
);
this
.
add
(
text
);
...
...
@@ -71,7 +71,7 @@ SunburstPieceProto.updateData = function (
var
itemStyleModel
=
itemModel
.
getModel
(
'
itemStyle
'
);
var
visualColor
=
getNodeColor
(
node
,
seriesModel
,
ecModel
);
var
normalStyle
=
itemStyleModel
.
get
Model
(
'
normal
'
).
get
ItemStyle
();
var
normalStyle
=
itemStyleModel
.
getItemStyle
();
var
style
;
if
(
state
===
'
normal
'
)
{
style
=
normalStyle
;
...
...
@@ -161,7 +161,7 @@ SunburstPieceProto.onDownplay = function () {
SunburstPieceProto
.
_updateLabel
=
function
(
seriesModel
,
ecModel
,
visualColor
)
{
var
itemModel
=
this
.
node
.
getModel
();
var
labelModel
=
itemModel
.
getModel
(
'
label
.normal
'
);
var
labelModel
=
itemModel
.
getModel
(
'
label
'
);
var
labelHoverModel
=
itemModel
.
getModel
(
'
label.emphasis
'
);
var
text
=
zrUtil
.
retrieve
(
...
...
@@ -307,7 +307,7 @@ function getNodeColor(node, seriesModel, ecModel) {
}
// Self color or level color
var
color
=
node
.
getModel
(
'
itemStyle
.normal
'
).
get
(
'
color
'
);
var
color
=
node
.
getModel
(
'
itemStyle
'
).
get
(
'
color
'
);
if
(
color
)
{
return
color
;
}
...
...
src/chart/sunburst/SunburstSeries.js
浏览文件 @
5a1bced3
...
...
@@ -79,24 +79,20 @@ export default SeriesModel.extend({
renderLabelForZeroData
:
false
,
label
:
{
normal
:
{
// could be: 'radial', 'tangential', or 'none'
rotate
:
'
radial
'
,
show
:
true
,
// could be 'inner', 'outside', 'left' or 'right'
// 'left' is for inner side of inside, and 'right' is for outter
// side for inside
position
:
'
inner
'
,
padding
:
5
,
silent
:
true
},
// could be: 'radial', 'tangential', or 'none'
rotate
:
'
radial
'
,
show
:
true
,
// could be 'inner', 'outside', 'left' or 'right'
// 'left' is for inner side of inside, and 'right' is for outter
// side for inside
position
:
'
inner
'
,
padding
:
5
,
silent
:
true
,
emphasis
:
{}
},
itemStyle
:
{
normal
:
{
borderWidth
:
1
,
borderColor
:
'
white
'
},
borderWidth
:
1
,
borderColor
:
'
white
'
,
emphasis
:
{},
highlight
:
{
opacity
:
1
...
...
test/sunburst-book.html
浏览文件 @
5a1bced3
...
...
@@ -26,24 +26,16 @@
var
itemStyle
=
{
star5
:
{
normal
:
{
color
:
colors
[
0
]
}
color
:
colors
[
0
]
},
star4
:
{
normal
:
{
color
:
colors
[
1
]
}
color
:
colors
[
1
]
},
star3
:
{
normal
:
{
color
:
colors
[
2
]
}
color
:
colors
[
2
]
},
star2
:
{
normal
:
{
color
:
colors
[
3
]
}
color
:
colors
[
3
]
}
};
...
...
@@ -104,9 +96,7 @@
},
{
name
:
'
非虚构
'
,
itemStyle
:
{
normal
:
{
color
:
colors
[
2
]
}
color
:
colors
[
2
]
},
children
:
[{
name
:
'
设计
'
,
...
...
@@ -253,9 +243,7 @@
})(
block
[
star
].
name
);
block
[
star
].
label
=
{
normal
:
{
color
:
style
.
normal
.
color
},
color
:
style
.
color
,
downplay
:
{
opacity
:
0.5
}
...
...
@@ -263,19 +251,15 @@
if
(
block
[
star
].
children
)
{
style
=
{
normal
:
{
opacity
:
1
,
color
:
style
.
normal
.
color
}
opacity
:
1
,
color
:
style
.
color
};
block
[
star
].
children
.
forEach
(
function
(
book
)
{
book
.
value
=
1
;
book
.
itemStyle
=
style
;
book
.
label
=
{
normal
:
{
color
:
style
.
normal
.
color
}
color
:
style
.
color
};
var
value
=
1
;
...
...
@@ -297,9 +281,7 @@
}
level1
[
i
].
itemStyle
=
{
normal
:
{
color
:
data
[
j
].
itemStyle
.
normal
.
color
}
color
:
data
[
j
].
itemStyle
.
color
};
}
}
...
...
@@ -327,24 +309,18 @@
}
},
label
:
{
normal
:
{
rotate
:
'
radial
'
,
color
:
bgColor
}
rotate
:
'
radial
'
,
color
:
bgColor
},
itemStyle
:
{
normal
:
{
borderColor
:
bgColor
,
borderWidth
:
2
}
borderColor
:
bgColor
,
borderWidth
:
2
},
levels
:
[{},
{
r0
:
0
,
r
:
40
,
label
:
{
normal
:
{
rotate
:
'
none
'
}
rotate
:
'
none
'
}
},
{
r0
:
40
,
...
...
@@ -353,34 +329,26 @@
r0
:
115
,
r
:
140
,
itemStyle
:
{
normal
:
{
shadowBlur
:
2
,
shadowColor
:
colors
[
2
],
color
:
'
transparent
'
}
shadowBlur
:
2
,
shadowColor
:
colors
[
2
],
color
:
'
transparent
'
},
label
:
{
normal
:
{
rotate
:
'
tangential
'
,
fontSize
:
10
,
color
:
colors
[
0
]
}
rotate
:
'
tangential
'
,
fontSize
:
10
,
color
:
colors
[
0
]
}
},
{
r0
:
140
,
r
:
145
,
itemStyle
:
{
normal
:
{
shadowBlur
:
80
,
shadowColor
:
colors
[
0
]
}
shadowBlur
:
80
,
shadowColor
:
colors
[
0
]
},
label
:
{
normal
:
{
position
:
'
outside
'
,
textShadowBlur
:
5
,
textShadowColor
:
'
#333
'
},
position
:
'
outside
'
,
textShadowBlur
:
5
,
textShadowColor
:
'
#333
'
,
downplay
:
{
opacity
:
0.5
}
...
...
test/sunburst-drink.html
浏览文件 @
5a1bced3
此差异已折叠。
点击以展开。
test/sunburst-simple.html
浏览文件 @
5a1bced3
...
...
@@ -25,19 +25,13 @@
});
var
item1
=
{
normal
:
{
color
:
'
#F54F4A
'
}
color
:
'
#F54F4A
'
};
var
item2
=
{
normal
:
{
color
:
'
#FF8C75
'
}
color
:
'
#FF8C75
'
};
var
item3
=
{
normal
:
{
color
:
'
#FFB499
'
}
color
:
'
#FFB499
'
};
var
data
=
[{
...
...
test/sunburst-visualMap.html
浏览文件 @
5a1bced3
...
...
@@ -56,9 +56,7 @@
name
:
'
Me
'
,
value
:
5
,
itemStyle
:
{
normal
:
{
color
:
'
red
'
}
color
:
'
red
'
}
},
{
name
:
'
Brother Peter
'
,
...
...
@@ -109,9 +107,7 @@
data
:
data
,
radius
:
[
0
,
'
90%
'
],
label
:
{
normal
:
{
rotate
:
'
radial
'
}
rotate
:
'
radial
'
}
}
});
...
...
test/sunburst.html
浏览文件 @
5a1bced3
...
...
@@ -36,9 +36,7 @@
name
:
'
Cousin Mary
'
,
value
:
5
,
itemStyle
:
{
normal
:
{
opacity
:
0.2
}
opacity
:
0.2
},
children
:
[{
name
:
'
Jackson
'
,
...
...
@@ -49,9 +47,7 @@
value
:
4
}],
itemStyle
:
{
normal
:
{
color
:
'
#660
'
}
color
:
'
#660
'
}
},
{
name
:
'
Aunt Jane
'
,
...
...
@@ -59,9 +55,7 @@
name
:
'
Cousin Kate
'
,
value
:
4
,
itemStyle
:
{
normal
:
{
color
:
'
blue
'
}
color
:
'
#660
'
}
}]
},
{
...
...
@@ -122,47 +116,33 @@
data
:
data
,
radius
:
[
0
,
'
90%
'
],
label
:
{
normal
:
{
rotate
:
'
radial
'
}
rotate
:
'
radial
'
},
levels
:
[{
itemStyle
:
{
normal
:
{
opacity
:
1
,
color
:
'
#70d
'
}
opacity
:
1
,
color
:
'
#70d
'
}
},
{
itemStyle
:
{
normal
:
{
opacity
:
0.8
,
color
:
'
#f0f
'
}
opacity
:
0.8
,
color
:
'
#f0f
'
},
label
:
{
normal
:
{
opacity
:
0.8
,
formatter
:
'
{a}: {b}
'
}
opacity
:
0.8
,
formatter
:
'
{a}: {b}
'
}
},
{
itemStyle
:
{
normal
:
{
opacity
:
0.6
,
color
:
'
#00f
'
}
opacity
:
0.6
,
color
:
'
#00f
'
},
label
:
{
normal
:
{
opacity
:
0.6
}
opacity
:
0.6
}
},
{
itemStyle
:
{
normal
:
{
opacity
:
0.4
}
opacity
:
0.4
}
}]
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录