Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
60d2751b
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,体验更适合开发者的 AI 搜索 >>
提交
60d2751b
编写于
9月 24, 2019
作者:
Y
yufeng04
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Modified the logic of function setSymbolStyle
上级
203f17a4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
7 deletion
+13
-7
src/component/legend/LegendView.js
src/component/legend/LegendView.js
+10
-6
test/legend-borderColor.html
test/legend-borderColor.html
+3
-1
未找到文件。
src/component/legend/LegendView.js
浏览文件 @
60d2751b
...
...
@@ -314,7 +314,7 @@ export default echarts.extendComponentView({
var
inactiveColor
=
legendModel
.
get
(
'
inactiveColor
'
);
var
inactiveBorderColor
=
legendModel
.
get
(
'
inactiveBorderColor
'
);
var
symbolKeepAspect
=
legendModel
.
get
(
'
symbolKeepAspect
'
);
var
itemStyle
=
legendModel
.
getModel
(
'
itemStyle
'
).
getItemStyle
(
);
var
legendModelItemStyle
=
legendModel
.
getModel
(
'
itemStyle
'
);
var
isSelected
=
legendModel
.
isSelected
(
name
);
var
itemGroup
=
new
Group
();
...
...
@@ -340,7 +340,7 @@ export default echarts.extendComponentView({
);
itemGroup
.
add
(
setSymbolStyle
(
legendSymbol
,
legendSymbolType
,
i
temStyle
,
legendSymbol
,
legendSymbolType
,
legendModelI
temStyle
,
borderColor
,
inactiveBorderColor
,
isSelected
)
);
...
...
@@ -368,7 +368,7 @@ export default echarts.extendComponentView({
// Put symbol in the center
itemGroup
.
add
(
setSymbolStyle
(
legendSymbolCenter
,
symbolType
,
i
temStyle
,
legendSymbolCenter
,
symbolType
,
legendModelI
temStyle
,
borderColor
,
inactiveBorderColor
,
isSelected
)
);
...
...
@@ -503,15 +503,19 @@ export default echarts.extendComponentView({
});
function
setSymbolStyle
(
symbol
,
symbolType
,
itemStyle
,
borderColor
,
inactiveBorderColor
,
isSelected
)
{
function
setSymbolStyle
(
symbol
,
symbolType
,
legendModelItemStyle
,
borderColor
,
inactiveBorderColor
,
isSelected
)
{
var
itemStyle
;
if
(
symbolType
!==
'
line
'
&&
symbolType
.
indexOf
(
'
empty
'
)
<
0
)
{
itemStyle
=
legendModelItemStyle
.
getItemStyle
();
symbol
.
style
.
stroke
=
borderColor
;
if
(
!
isSelected
)
{
itemStyle
.
stroke
=
inactiveBorderColor
;
}
symbol
.
setStyle
(
itemStyle
);
}
return
symbol
;
else
{
itemStyle
=
legendModelItemStyle
.
getItemStyle
([
'
borderWidth
'
,
'
borderColor
'
]);
}
return
symbol
.
setStyle
(
itemStyle
);
}
function
dispatchSelectAction
(
name
,
api
)
{
...
...
test/legend-borderColor.html
浏览文件 @
60d2751b
...
...
@@ -74,7 +74,8 @@ under the License.
data
:
[
'
邮件营销
'
,
'
联盟广告
'
,
'
视频广告
'
,
'
直接访问
'
,
'
搜索引擎
'
],
itemStyle
:
{
// borderColor: '#f00',
borderWidth
:
3
borderWidth
:
3
,
borderType
:
'
dashed
'
},
selected
:
{
'
联盟广告
'
:
false
,
...
...
@@ -179,6 +180,7 @@ under the License.
title
:
[
'
(Legend symbol of line)
'
,
'
the emptyCircle symbol doesn
\'
t have fillColor, so the strokeColor should be the same as color of corresponding series
'
,
'
the borderType of legend symbol is dashed, especially the first emptyCircle symbol
'
,
'
the color of line in legend symbol should be same as corresponding symbol
'
,
'
the borderWidth of legend symbols should only be determined by legend.itemStyle.borderWidth
'
,
'
the second and the third legend symbol should be unselected
'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录