Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
missman
incubator-echarts
提交
100d79ea
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,发现更多精彩内容 >>
提交
100d79ea
编写于
10月 16, 2015
作者:
L
lang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Null data in line chart
上级
a0c3f5ff
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
96 addition
and
47 deletion
+96
-47
src/chart/helper/DataSymbol.js
src/chart/helper/DataSymbol.js
+4
-2
src/chart/line/Area.js
src/chart/line/Area.js
+0
-39
src/chart/line/LineView.js
src/chart/line/LineView.js
+4
-3
src/chart/line/poly.js
src/chart/line/poly.js
+76
-0
src/data/List.js
src/data/List.js
+4
-1
src/layout/points.js
src/layout/points.js
+8
-2
未找到文件。
src/chart/helper/DataSymbol.js
浏览文件 @
100d79ea
...
...
@@ -174,14 +174,16 @@ define(function (require) {
.
execute
();
// Update common properties
var
itemStyleAccessPath
=
[
'
itemStyle
'
,
'
normal
'
];
data
.
eachItemGraphicEl
(
function
(
el
,
idx
)
{
var
itemModel
=
data
.
getItemModel
(
idx
);
var
labelModel
=
itemModel
.
getModel
(
'
itemStyle.normal.label
'
);
var
normalItemStyleModel
=
itemModel
.
getModel
(
itemStyleAccessPath
);
var
labelModel
=
normalItemStyleModel
.
getModel
(
'
label
'
);
var
color
=
data
.
getItemVisual
(
idx
,
'
color
'
);
zrUtil
.
extend
(
el
.
style
,
itemModel
.
getModel
(
'
itemStyle.normal
'
)
.
getItemStyle
([
'
color
'
])
normalItemStyleModel
.
getItemStyle
([
'
color
'
])
);
if
(
labelModel
.
get
(
'
show
'
))
{
...
...
src/chart/line/Area.js
已删除
100644 → 0
浏览文件 @
a0c3f5ff
define
(
function
(
require
)
{
'
use strict
'
;
var
smoothBezier
=
require
(
'
zrender/graphic/helper/smoothBezier
'
);
return
require
(
'
zrender/graphic/Path
'
).
extend
({
type
:
'
ec-area
'
,
shape
:
{
points
:
[],
// Offset between stacked base points and points
stackedOnPoints
:
[]
},
buildPath
:
function
(
ctx
,
shape
)
{
var
points
=
shape
.
points
;
var
stackedOnPoints
=
shape
.
stackedOnPoints
;
var
i
=
0
;
var
len
=
points
.
length
;
while
(
i
<
len
)
{
for
(
var
k
=
i
;
k
<
len
;
k
++
)
{
var
p
=
points
[
k
];
if
(
p
==
null
||
isNaN
(
p
[
0
])
||
isNaN
(
p
[
1
]))
{
break
;
}
ctx
[
k
===
i
?
'
moveTo
'
:
'
lineTo
'
](
p
[
0
],
p
[
1
]);
}
var
tmp
=
k
;
for
(
k
--
;
k
>=
i
;
k
--
)
{
var
p
=
stackedOnPoints
[
k
];
ctx
.
lineTo
(
p
[
0
],
p
[
1
]);
}
i
=
tmp
+
1
;
}
}
});
});
\ No newline at end of file
src/chart/line/LineView.js
浏览文件 @
100d79ea
...
...
@@ -9,7 +9,8 @@ define(function(require) {
var
DataSymbol
=
require
(
'
../helper/DataSymbol
'
);
var
lineAnimationDiff
=
require
(
'
./lineAnimationDiff
'
);
var
graphic
=
require
(
'
../../util/graphic
'
);
var
AreaPath
=
require
(
'
./Area
'
);
var
polyHelper
=
require
(
'
./poly
'
);
function
isPointsSame
(
points1
,
points2
)
{
if
(
points1
.
length
!==
points2
.
length
)
{
...
...
@@ -193,7 +194,7 @@ define(function(require) {
group
.
remove
(
polyline
);
}
polyline
=
new
graphic
.
Polyline
({
polyline
=
new
polyHelper
.
Polyline
({
shape
:
{
points
:
points
},
...
...
@@ -226,7 +227,7 @@ define(function(require) {
group
.
remove
(
polygon
);
}
polygon
=
new
AreaPath
({
polygon
=
new
polyHelper
.
Polygon
({
shape
:
{
points
:
points
,
stackedOnPoints
:
stackedOnPoints
...
...
src/chart/line/poly.js
0 → 100644
浏览文件 @
100d79ea
// Poly path support NaN point
define
(
function
(
require
)
{
var
smoothBezier
=
require
(
'
zrender/graphic/helper/smoothBezier
'
);
var
Path
=
require
(
'
zrender/graphic/Path
'
);
return
{
Polyline
:
Path
.
extend
({
type
:
'
ec-polyline
'
,
shape
:
{
points
:
[]
},
style
:
{
fill
:
null
,
stroke
:
'
#000
'
},
buildPath
:
function
(
ctx
,
shape
)
{
var
points
=
shape
.
points
;
var
i
=
0
;
var
len
=
points
.
length
;
while
(
i
<
len
)
{
for
(
var
k
=
i
;
k
<
len
;
k
++
)
{
var
p
=
points
[
k
];
if
(
p
==
null
||
isNaN
(
p
[
0
])
||
isNaN
(
p
[
1
]))
{
break
;
}
ctx
[
k
===
i
?
'
moveTo
'
:
'
lineTo
'
](
p
[
0
],
p
[
1
]);
}
i
=
k
+
1
;
}
}
}),
Polygon
:
Path
.
extend
({
type
:
'
ec-polygon
'
,
shape
:
{
points
:
[],
// Offset between stacked base points and points
stackedOnPoints
:
[]
},
buildPath
:
function
(
ctx
,
shape
)
{
var
points
=
shape
.
points
;
var
stackedOnPoints
=
shape
.
stackedOnPoints
;
var
i
=
0
;
var
len
=
points
.
length
;
while
(
i
<
len
)
{
for
(
var
k
=
i
;
k
<
len
;
k
++
)
{
var
p
=
points
[
k
];
if
(
p
==
null
||
isNaN
(
p
[
0
])
||
isNaN
(
p
[
1
]))
{
break
;
}
ctx
[
k
===
i
?
'
moveTo
'
:
'
lineTo
'
](
p
[
0
],
p
[
1
]);
}
var
tmp
=
k
;
for
(
k
--
;
k
>=
i
;
k
--
)
{
var
p
=
stackedOnPoints
[
k
];
ctx
.
lineTo
(
p
[
0
],
p
[
1
]);
}
i
=
tmp
+
1
;
}
}
})
};
});
\ No newline at end of file
src/data/List.js
浏览文件 @
100d79ea
...
...
@@ -195,6 +195,9 @@ define(function (require) {
var
tempValue
=
[];
var
rawValueTo1D
=
false
;
var
value1D
=
dimensions
.
length
===
1
;
// Use the first data to indicate data type;
var
isValueArray
=
zrUtil
.
isArray
(
data
[
0
]);
for
(
var
idx
=
0
;
idx
<
data
.
length
;
idx
++
)
{
var
value
=
data
[
idx
];
// Each data item contains value and option
...
...
@@ -212,7 +215,7 @@ define(function (require) {
// Bar chart, line chart which uses category axis
// only gives the 'y' value. 'x' value is the indices of cateogry
// Use a tempValue to normalize the value to be a (x, y) value
if
(
!
is
NaN
(
value
)
)
{
if
(
!
is
ValueArray
)
{
if
(
!
value1D
)
{
tempValue
[
0
]
=
idx
;
tempValue
[
1
]
=
value
;
...
...
src/layout/points.js
浏览文件 @
100d79ea
...
...
@@ -7,10 +7,16 @@ define(function (require) {
var
dims
=
coordSys
.
dimensions
;
data
.
each
(
dims
,
function
(
x
,
y
,
idx
)
{
var
point
;
if
(
!
isNaN
(
y
)
&&
!
isNaN
(
x
))
{
var
point
=
coordSys
.
dataToPoint
([
x
,
y
]);
data
.
setItemLayout
(
idx
,
point
);
point
=
coordSys
.
dataToPoint
([
x
,
y
]);
}
else
{
// Also {Array.<number>}, not undefined to avoid if...else... statement
point
=
[
NaN
,
NaN
];
}
data
.
setItemLayout
(
idx
,
point
);
},
true
);
});
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录