Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
fa5ad1b6
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,发现更多精彩内容 >>
提交
fa5ad1b6
编写于
3月 17, 2014
作者:
K
kener
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
支持normal.color为function
上级
b7dafa91
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
35 addition
and
16 deletion
+35
-16
src/component/base.js
src/component/base.js
+35
-16
未找到文件。
src/component/base.js
浏览文件 @
fa5ad1b6
...
...
@@ -562,13 +562,15 @@ define(function(require) {
?
data
[
i
][
0
].
value
:
''
;
itemShape
=
getLineMarkShape
(
mlOption
,
// markLine
mlOption
,
// markLine
seriesIndex
,
data
[
i
],
// 数据
i
,
parsePercent
(
data
[
i
][
0
].
x
,
zrWidth
),
// 坐标
parsePercent
(
data
[
i
][
0
].
y
,
zrHeight
),
// 坐标
parsePercent
(
data
[
i
][
1
].
x
,
zrWidth
),
// 坐标
parsePercent
(
data
[
i
][
1
].
y
,
zrHeight
),
// 坐标
color
// 默认symbol和color
color
// 默认symbol和color
);
effect
=
self
.
deepMerge
(
...
...
@@ -598,7 +600,7 @@ define(function(require) {
}
function
getSymbolShape
(
serie
,
seriesIndex
,
// 系列
serie
,
seriesIndex
,
// 系列
data
,
dataIndex
,
name
,
// 数据
x
,
y
,
// 坐标
symbol
,
color
,
// 默认symbol和color,来自legend或dataRange全局分配
...
...
@@ -651,16 +653,21 @@ define(function(require) {
brushType
:
'
both
'
,
color
:
symbol
.
match
(
'
empty
'
)
?
emptyColor
:
(
normal
.
color
||
color
),
strokeColor
:
normal
.
borderColor
||
normal
.
color
||
color
,
:
(
self
.
getItemStyleColor
(
normal
.
color
,
seriesIndex
,
dataIndex
,
data
)
||
color
),
strokeColor
:
normal
.
borderColor
||
self
.
getItemStyleColor
(
normal
.
color
,
seriesIndex
,
dataIndex
,
data
)
||
color
,
lineWidth
:
nBorderWidth
},
highlightStyle
:
{
color
:
symbol
.
match
(
'
empty
'
)
?
emptyColor
:
(
emphasis
.
color
||
normal
.
color
||
color
),
strokeColor
:
emphasis
.
borderColor
||
normal
.
borderColor
||
emphasis
.
color
||
normal
.
color
||
color
,
:
self
.
getItemStyleColor
(
emphasis
.
color
,
seriesIndex
,
dataIndex
,
data
),
strokeColor
:
emphasis
.
borderColor
||
normal
.
borderColor
||
self
.
getItemStyleColor
(
normal
.
color
,
seriesIndex
,
dataIndex
,
data
)
||
color
,
lineWidth
:
eBorderWidth
},
clickable
:
true
...
...
@@ -731,7 +738,9 @@ define(function(require) {
function
getLineMarkShape
(
mlOption
,
// 系列
seriesIndex
,
// 系列索引
data
,
// 数据
dataIndex
,
// 数据索引
xStart
,
yStart
,
// 坐标
xEnd
,
yEnd
,
// 坐标
color
// 默认color,来自legend或dataRange全局分配
...
...
@@ -771,10 +780,12 @@ define(function(require) {
queryTarget
,
'
itemStyle.normal
'
);
normal
.
color
=
self
.
getItemStyleColor
(
normal
.
color
,
seriesIndex
,
dataIndex
,
data
);
var
emphasis
=
self
.
deepMerge
(
queryTarget
,
'
itemStyle.emphasis
'
);
emphasis
.
color
=
self
.
getItemStyleColor
(
emphasis
.
color
,
seriesIndex
,
dataIndex
,
data
);
var
nlineStyle
=
normal
.
lineStyle
;
var
elineStyle
=
emphasis
.
lineStyle
;
...
...
@@ -814,12 +825,12 @@ define(function(require) {
color
:
normal
.
color
||
color
,
strokeColor
:
nlineStyle
.
color
||
normal
.
borderColor
||
color
||
normal
.
color
,
||
normal
.
color
||
color
,
lineWidth
:
nBorderWidth
,
symbolBorderColor
:
normal
.
borderColor
||
color
||
normal
.
color
,
||
normal
.
color
||
color
,
symbolBorder
:
normal
.
borderWidth
},
highlightStyle
:
{
...
...
@@ -832,15 +843,15 @@ define(function(require) {
||
nlineStyle
.
color
||
emphasis
.
borderColor
||
normal
.
borderColor
||
color
||
emphasis
.
color
||
normal
.
color
,
||
normal
.
color
||
color
,
lineWidth
:
eBorderWidth
,
symbolBorderColor
:
emphasis
.
borderColor
||
normal
.
borderColor
||
color
||
emphasis
.
color
||
normal
.
color
,
||
normal
.
color
||
color
,
symbolBorder
:
typeof
emphasis
.
borderWidth
==
'
undefined
'
?
(
normal
.
borderWidth
+
2
)
:
(
emphasis
.
borderWidth
)
...
...
@@ -912,6 +923,13 @@ define(function(require) {
+
(
x
.
length
>
1
?
(
'
.
'
+
x
[
1
])
:
''
);
}
function
getItemStyleColor
(
itemColor
,
seriesIndex
,
dataIndex
,
data
)
{
return
typeof
itemColor
==
'
function
'
?
itemColor
(
seriesIndex
,
dataIndex
,
data
)
:
itemColor
;
}
function
_trim
(
str
)
{
return
str
.
replace
(
/^
\s\s
*/
,
''
).
replace
(
/
\s\s
*$/
,
''
);
}
...
...
@@ -1262,6 +1280,7 @@ define(function(require) {
self
.
parseCenter
=
parseCenter
;
self
.
parseRadius
=
parseRadius
;
self
.
numAddCommas
=
numAddCommas
;
self
.
getItemStyleColor
=
getItemStyleColor
;
self
.
subPixelOptimize
=
subPixelOptimize
;
self
.
animation
=
animation
;
self
.
animationMark
=
animationMark
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录