Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
alon@wen
echarts
提交
6f9fd7a6
E
echarts
项目概览
alon@wen
/
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,发现更多精彩内容 >>
提交
6f9fd7a6
编写于
12月 11, 2014
作者:
K
kener
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tooltip bug fixed
上级
1153a9c7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
13 deletion
+10
-13
src/component/tooltip.js
src/component/tooltip.js
+9
-12
src/config.js
src/config.js
+1
-1
未找到文件。
src/component/tooltip.js
浏览文件 @
6f9fd7a6
...
@@ -215,6 +215,7 @@ define(function (require) {
...
@@ -215,6 +215,7 @@ define(function (require) {
__hide
:
function
()
{
__hide
:
function
()
{
this
.
_lastDataIndex
=
-
1
;
this
.
_lastDataIndex
=
-
1
;
this
.
_lastSeriesIndex
=
-
1
;
this
.
_lastSeriesIndex
=
-
1
;
this
.
_lastItemTriggerId
=
-
1
;
if
(
this
.
_tDom
)
{
if
(
this
.
_tDom
)
{
this
.
_tDom
.
style
.
display
=
'
none
'
;
this
.
_tDom
.
style
.
display
=
'
none
'
;
}
}
...
@@ -925,17 +926,15 @@ define(function (require) {
...
@@ -925,17 +926,15 @@ define(function (require) {
specialCssText
+=
this
.
_style
(
this
.
query
(
data
,
'
tooltip
'
));
specialCssText
+=
this
.
_style
(
this
.
query
(
data
,
'
tooltip
'
));
}
}
else
{
else
{
this
.
_lastDataIndex
=
NaN
;
this
.
_lastItemTriggerId
=
NaN
;
this
.
_lastSeriesIndex
=
NaN
;
showContent
=
this
.
deepQuery
([
data
,
serie
,
this
.
option
],
'
tooltip.showContent
'
);
showContent
=
this
.
deepQuery
([
data
,
serie
,
this
.
option
],
'
tooltip.showContent
'
);
formatter
=
this
.
deepQuery
([
data
,
serie
,
this
.
option
],
'
tooltip.islandFormatter
'
);
formatter
=
this
.
deepQuery
([
data
,
serie
,
this
.
option
],
'
tooltip.islandFormatter
'
);
position
=
this
.
deepQuery
([
data
,
serie
,
this
.
option
],
'
tooltip.islandPosition
'
);
position
=
this
.
deepQuery
([
data
,
serie
,
this
.
option
],
'
tooltip.islandPosition
'
);
}
}
// 相同dataIndex seriesIndex时不再触发内容更新
// 相同dataIndex seriesIndex时不再触发内容更新
if
(
this
.
_lastDataIndex
!=
dataIndex
||
this
.
_lastSeriesIndex
!=
seriesIndex
)
{
if
(
this
.
_lastItemTriggerId
!==
this
.
_curTarget
.
id
)
{
this
.
_lastDataIndex
=
dataIndex
;
this
.
_lastItemTriggerId
=
this
.
_curTarget
.
id
;
this
.
_lastSeriesIndex
=
seriesIndex
;
if
(
typeof
formatter
===
'
function
'
)
{
if
(
typeof
formatter
===
'
function
'
)
{
this
.
_curTicket
=
(
serie
.
name
||
''
)
+
'
:
'
+
dataIndex
;
this
.
_curTicket
=
(
serie
.
name
||
''
)
+
'
:
'
+
dataIndex
;
this
.
_tDom
.
innerHTML
=
formatter
.
call
(
this
.
_tDom
.
innerHTML
=
formatter
.
call
(
...
@@ -1010,8 +1009,7 @@ define(function (require) {
...
@@ -1010,8 +1009,7 @@ define(function (require) {
this
.
_tDom
.
innerHTML
=
''
this
.
_tDom
.
innerHTML
=
''
+
(
serie
.
name
!=
null
?
(
this
.
_encodeHTML
(
serie
.
name
)
+
'
<br/>
'
)
:
''
)
+
(
serie
.
name
!=
null
?
(
this
.
_encodeHTML
(
serie
.
name
)
+
'
<br/>
'
)
:
''
)
+
(
name
===
''
?
''
:
(
this
.
_encodeHTML
(
name
)
+
'
:
'
))
+
(
name
===
''
?
''
:
(
this
.
_encodeHTML
(
name
)
+
'
:
'
))
+
(
value
instanceof
Array
?
value
:
this
.
numAddCommas
(
value
))
+
(
value
instanceof
Array
?
value
:
this
.
numAddCommas
(
value
));
+
(
special
==
null
?
''
:
(
'
(
'
+
special
+
'
)
'
));
}
}
}
}
}
}
...
@@ -1118,10 +1116,7 @@ define(function (require) {
...
@@ -1118,10 +1116,7 @@ define(function (require) {
style
[
pType
].
type
=
axisPointer
[
pType
+
'
Style
'
].
type
;
style
[
pType
].
type
=
axisPointer
[
pType
+
'
Style
'
].
type
;
}
}
for
(
var
i
=
0
,
l
=
seriesArray
.
length
;
i
<
l
;
i
++
)
{
for
(
var
i
=
0
,
l
=
seriesArray
.
length
;
i
<
l
;
i
++
)
{
if
(
this
.
deepQuery
(
if
(
this
.
deepQuery
([
seriesArray
[
i
],
this
.
option
],
'
tooltip.trigger
'
)
===
'
axis
'
)
{
[
seriesArray
[
i
],
this
.
option
],
'
tooltip.trigger
'
)
===
'
axis
'
)
{
queryTarget
=
seriesArray
[
i
];
queryTarget
=
seriesArray
[
i
];
curType
=
this
.
query
(
queryTarget
,
'
tooltip.axisPointer.type
'
);
curType
=
this
.
query
(
queryTarget
,
'
tooltip.axisPointer.type
'
);
pointType
=
curType
||
pointType
;
pointType
=
curType
||
pointType
;
...
@@ -1242,7 +1237,7 @@ define(function (require) {
...
@@ -1242,7 +1237,7 @@ define(function (require) {
__onmousemove
:
function
(
param
)
{
__onmousemove
:
function
(
param
)
{
clearTimeout
(
this
.
_hidingTicket
);
clearTimeout
(
this
.
_hidingTicket
);
clearTimeout
(
this
.
_showingTicket
);
clearTimeout
(
this
.
_showingTicket
);
if
(
this
.
_mousein
&&
this
.
enterable
)
{
if
(
this
.
_mousein
&&
this
.
_
enterable
)
{
return
;
return
;
}
}
var
target
=
param
.
target
;
var
target
=
param
.
target
;
...
@@ -1644,6 +1639,7 @@ define(function (require) {
...
@@ -1644,6 +1639,7 @@ define(function (require) {
this
.
_lastDataIndex
=
-
1
;
this
.
_lastDataIndex
=
-
1
;
this
.
_lastSeriesIndex
=
-
1
;
this
.
_lastSeriesIndex
=
-
1
;
this
.
_lastItemTriggerId
=
-
1
;
if
(
newOption
)
{
if
(
newOption
)
{
this
.
option
=
newOption
;
this
.
option
=
newOption
;
...
@@ -1672,6 +1668,7 @@ define(function (require) {
...
@@ -1672,6 +1668,7 @@ define(function (require) {
this
.
_setSelectedMap
();
this
.
_setSelectedMap
();
this
.
_axisLineWidth
=
this
.
option
.
tooltip
.
axisPointer
.
lineStyle
.
width
;
this
.
_axisLineWidth
=
this
.
option
.
tooltip
.
axisPointer
.
lineStyle
.
width
;
this
.
_enterable
=
this
.
option
.
tooltip
.
enterable
;
}
}
if
(
this
.
showing
)
{
if
(
this
.
showing
)
{
var
self
=
this
;
var
self
=
this
;
...
...
src/config.js
浏览文件 @
6f9fd7a6
...
@@ -244,7 +244,7 @@ define(function() {
...
@@ -244,7 +244,7 @@ define(function() {
showDelay
:
20
,
// 显示延迟,添加显示延迟可以避免频繁切换,单位ms
showDelay
:
20
,
// 显示延迟,添加显示延迟可以避免频繁切换,单位ms
hideDelay
:
100
,
// 隐藏延迟,单位ms
hideDelay
:
100
,
// 隐藏延迟,单位ms
transitionDuration
:
0.4
,
// 动画变换时间,单位s
transitionDuration
:
0.4
,
// 动画变换时间,单位s
enterable
:
tru
e
,
enterable
:
fals
e
,
backgroundColor
:
'
rgba(0,0,0,0.7)
'
,
// 提示背景颜色,默认为透明度为0.7的黑色
backgroundColor
:
'
rgba(0,0,0,0.7)
'
,
// 提示背景颜色,默认为透明度为0.7的黑色
borderColor
:
'
#333
'
,
// 提示边框颜色
borderColor
:
'
#333
'
,
// 提示边框颜色
borderRadius
:
4
,
// 提示边框圆角,单位px,默认为4
borderRadius
:
4
,
// 提示边框圆角,单位px,默认为4
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录