Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
d140ddc7
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,发现更多精彩内容 >>
提交
d140ddc7
编写于
11月 01, 2015
作者:
L
lang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Graph legend selectable
上级
242830b3
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
28 addition
and
25 deletion
+28
-25
src/chart/graph/GraphView.js
src/chart/graph/GraphView.js
+4
-1
src/chart/helper/LineDraw.js
src/chart/helper/LineDraw.js
+6
-3
src/chart/helper/SymbolDraw.js
src/chart/helper/SymbolDraw.js
+5
-5
src/chart/line/LineView.js
src/chart/line/LineView.js
+10
-13
src/data/helper/linkList.js
src/data/helper/linkList.js
+1
-1
src/util/graphic.js
src/util/graphic.js
+2
-2
未找到文件。
src/chart/graph/GraphView.js
浏览文件 @
d140ddc7
...
...
@@ -41,7 +41,10 @@ define(function (require) {
lineDraw
.
updateData
(
data
.
graph
.
edgeData
,
seriesModel
,
api
,
false
seriesModel
,
api
,
false
,
function
(
idx
)
{
return
data
.
graph
.
edges
[
idx
].
dataIndex
>=
0
;
}
);
// Save the original lineWidth
...
...
src/chart/helper/LineDraw.js
浏览文件 @
d140ddc7
...
...
@@ -13,15 +13,18 @@ define(function (require) {
* @param {module:echarts/model/Series} seriesModel
* @param {module:echarts/ExtensionAPI} api
* @param {boolean} [enableAnimation=false]
* @param {Function} [isIgnore]
*/
lineDrawProto
.
updateData
=
function
(
data
,
seriesModel
,
api
,
enableAnimation
)
{
lineDrawProto
.
updateData
=
function
(
data
,
seriesModel
,
api
,
enableAnimation
,
isIgnore
)
{
var
group
=
this
.
group
;
var
oldData
=
this
.
_data
;
data
.
diff
(
oldData
)
.
add
(
function
(
idx
)
{
var
shape
=
data
.
getItemLayout
(
idx
);
if
(
shape
)
{
if
(
!
(
isIgnore
&&
isIgnore
[
idx
])
)
{
var
line
=
new
graphic
[
shape
.
cpx1
!=
null
?
'
BezierCurve
'
:
'
Line
'
]({
shape
:
shape
});
...
...
@@ -33,7 +36,7 @@ define(function (require) {
.
update
(
function
(
newIdx
,
oldIdx
)
{
var
line
=
oldData
.
getItemGraphicEl
(
oldIdx
);
var
shape
=
data
.
getItemLayout
(
newIdx
);
if
(
!
shape
)
{
if
(
!
(
isIgnore
&&
isIgnore
(
newIdx
))
)
{
group
.
remove
(
line
);
return
;
}
...
...
src/chart/helper/SymbolDraw.js
浏览文件 @
d140ddc7
...
...
@@ -65,10 +65,10 @@ define(function (require) {
* @param {module:echarts/model/Series} seriesModel
* @param {module:echarts/ExtensionAPI} api
* @param {boolean} [enableAnimation=false]
* @param {Array.<boolean>} [i
gnoreMap
]
* @param {Array.<boolean>} [i
sIgnore
]
*/
symbolProto
.
updateData
=
function
(
data
,
seriesModel
,
api
,
enableAnimation
,
i
gnoreMap
data
,
seriesModel
,
api
,
enableAnimation
,
i
sIgnore
)
{
var
group
=
this
.
group
;
...
...
@@ -76,7 +76,7 @@ define(function (require) {
data
.
diff
(
oldData
)
.
add
(
function
(
newIdx
)
{
if
(
data
.
hasValue
(
newIdx
)
&&
!
(
i
gnoreMap
&&
ignoreMap
[
newIdx
]
))
{
if
(
data
.
hasValue
(
newIdx
)
&&
!
(
i
sIgnore
&&
isIgnore
(
newIdx
)
))
{
var
symbolEl
=
createSymbol
(
data
,
newIdx
,
enableAnimation
);
if
(
symbolEl
)
{
...
...
@@ -88,7 +88,7 @@ define(function (require) {
.
update
(
function
(
newIdx
,
oldIdx
)
{
var
el
=
oldData
.
getItemGraphicEl
(
oldIdx
);
// Empty data
if
(
!
data
.
hasValue
(
newIdx
)
||
(
i
gnoreMap
&&
ignoreMap
[
newIdx
]
))
{
if
(
!
data
.
hasValue
(
newIdx
)
||
(
i
sIgnore
&&
isIgnore
(
newIdx
)
))
{
group
.
remove
(
el
);
return
;
}
...
...
@@ -102,7 +102,7 @@ define(function (require) {
// Symbol changed
if
(
oldData
.
getItemVisual
(
oldIdx
,
'
symbol
'
)
!==
symbolType
||
(
!
el
&&
!
(
i
gnoreMap
&&
ignoreMap
[
newIdx
]
))
||
(
!
el
&&
!
(
i
sIgnore
&&
isIgnore
(
newIdx
)
))
)
{
// Remove the old one
el
&&
group
.
remove
(
el
);
...
...
src/chart/line/LineView.js
浏览文件 @
d140ddc7
...
...
@@ -110,8 +110,8 @@ define(function(require) {
var
stackedOnPoints
=
getStackedOnPoints
(
coordSys
,
data
);
var
symbolIgnoreMap
=
!
isCoordSysPolar
&&
!
seriesModel
.
get
(
'
showAllSymbol
'
)
&&
this
.
_getSymbolIgnore
d
(
data
,
coordSys
);
var
isSymbolIgnore
=
!
isCoordSysPolar
&&
!
seriesModel
.
get
(
'
showAllSymbol
'
)
&&
this
.
_getSymbolIgnore
Func
(
data
,
coordSys
);
// Initialization animation or coordinate system changed
if
(
...
...
@@ -120,7 +120,7 @@ define(function(require) {
&&
hasAnimation
)
)
{
symbolDraw
.
updateData
(
data
,
seriesModel
,
api
,
hasAnimation
,
symbolIgnoreMap
data
,
seriesModel
,
api
,
hasAnimation
,
isSymbolIgnore
);
polyline
=
this
.
_newPolyline
(
group
,
points
,
coordSys
,
hasAnimation
);
...
...
@@ -135,7 +135,7 @@ define(function(require) {
else
{
symbolDraw
.
updateData
(
data
,
seriesModel
,
api
,
false
,
symbolIgnoreMap
data
,
seriesModel
,
api
,
false
,
isSymbolIgnore
);
// Update clipPath
...
...
@@ -281,20 +281,17 @@ define(function(require) {
/**
* @private
*/
_getSymbolIgnore
d
:
function
(
data
,
coordSys
)
{
_getSymbolIgnore
Func
:
function
(
data
,
coordSys
)
{
var
categoryAxis
=
coordSys
.
getAxesByScale
(
'
ordinal
'
)[
0
];
var
ignoreMap
;
// `getLabelInterval` is provided by echarts/component/axis
if
(
categoryAxis
&&
categoryAxis
.
getLabelInterval
)
{
ignoreMap
=
[];
var
labelInterval
=
categoryAxis
.
getLabelInterval
();
data
.
each
(
function
(
idx
)
{
ignoreMap
[
idx
]
=
(
typeof
labelInterval
===
'
function
'
)
&&
!
labelInterval
(
idx
,
categoryAxis
.
scale
.
getItem
(
idx
))
||
idx
%
(
labelInterval
+
1
);
}
)
;
return
function
(
idx
)
{
return
(
typeof
labelInterval
===
'
function
'
)
&&
!
labelInterval
(
idx
,
categoryAxis
.
scale
.
getItem
(
idx
))
||
idx
%
(
labelInterval
+
1
);
};
}
return
ignoreMap
;
},
/**
...
...
src/data/helper/linkList.js
浏览文件 @
d140ddc7
...
...
@@ -42,5 +42,5 @@ define(function (require) {
linkToTree
:
function
(
list
,
tree
)
{
linkList
(
list
,
tree
,
'
tree
'
);
}
}
}
;
});
\ No newline at end of file
src/util/graphic.js
浏览文件 @
d140ddc7
...
...
@@ -159,7 +159,7 @@ define(function(require) {
function
doSingleEnterHover
(
el
)
{
if
(
el
.
__isHover
)
{
return
;
}
;
}
if
(
el
.
__hoverStlDirty
)
{
var
stroke
=
el
.
style
.
stroke
;
var
fill
=
el
.
style
.
fill
;
...
...
@@ -266,7 +266,7 @@ define(function(require) {
/**
* Set hover style of element
* @param {module:zrender/
graphic/Displayable
} el
* @param {module:zrender/
Element
} el
* @param {Object} [hoverStyle]
*/
graphic
.
setHoverStyle
=
function
(
el
,
hoverStyle
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录