Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
58336fc9
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,发现更多精彩内容 >>
提交
58336fc9
编写于
5月 05, 2014
作者:
K
kener
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
动画过渡升级 scatter
上级
b9698694
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
14 addition
and
10 deletion
+14
-10
src/chart/calculableBase.js
src/chart/calculableBase.js
+3
-1
src/chart/scatter.js
src/chart/scatter.js
+11
-9
未找到文件。
src/chart/calculableBase.js
浏览文件 @
58336fc9
...
@@ -178,12 +178,13 @@ define(function (require) {
...
@@ -178,12 +178,13 @@ define(function (require) {
},
},
addShapeList
:
function
()
{
addShapeList
:
function
()
{
var
maxLenth
=
this
.
option
.
animationThreshold
/
(
this
.
canvasSupported
?
1
:
2
);
var
lastShapeList
=
this
.
lastShapeList
;
var
lastShapeList
=
this
.
lastShapeList
;
var
shapeList
=
this
.
shapeList
;
var
shapeList
=
this
.
shapeList
;
var
key
;
var
key
;
var
oldMap
=
{};
var
oldMap
=
{};
var
newMap
=
{};
var
newMap
=
{};
if
(
lastShapeList
&&
lastShapeList
.
length
>
0
)
{
if
(
lastShapeList
&&
lastShapeList
.
length
>
0
&&
lastShapeList
.
length
<
maxLenth
)
{
// 通过已有的shape做动画过渡
// 通过已有的shape做动画过渡
for
(
var
i
=
0
,
l
=
this
.
lastShapeList
.
length
;
i
<
l
;
i
++
)
{
for
(
var
i
=
0
,
l
=
this
.
lastShapeList
.
length
;
i
<
l
;
i
++
)
{
key
=
ecData
.
get
(
lastShapeList
[
i
],
'
seriesIndex
'
)
+
'
_
'
key
=
ecData
.
get
(
lastShapeList
[
i
],
'
seriesIndex
'
)
+
'
_
'
...
@@ -265,6 +266,7 @@ define(function (require) {
...
@@ -265,6 +266,7 @@ define(function (require) {
.
start
(
'
ExponentialOut
'
);
.
start
(
'
ExponentialOut
'
);
break
;
break
;
case
'
rectangle
'
:
case
'
rectangle
'
:
case
'
icon
'
:
var
newX
=
newShape
.
style
.
x
;
var
newX
=
newShape
.
style
.
x
;
var
newY
=
newShape
.
style
.
y
;
var
newY
=
newShape
.
style
.
y
;
var
newWidth
=
newShape
.
style
.
width
;
var
newWidth
=
newShape
.
style
.
width
;
...
...
src/chart/scatter.js
浏览文件 @
58336fc9
...
@@ -112,20 +112,19 @@ define(function (require) {
...
@@ -112,20 +112,19 @@ define(function (require) {
}
}
}
}
}
}
if
(
seriesArray
.
length
===
0
)
{
return
;
}
this
.
_buildSeries
(
seriesArray
);
this
.
_buildSeries
(
seriesArray
);
for
(
var
i
=
0
,
l
=
this
.
shapeList
.
length
;
i
<
l
;
i
++
)
{
this
.
addShapeList
();
this
.
zr
.
addShape
(
this
.
shapeList
[
i
]);
}
},
},
/**
/**
* 构建类目轴为水平方向的散点图系列
* 构建类目轴为水平方向的散点图系列
*/
*/
_buildSeries
:
function
(
seriesArray
)
{
_buildSeries
:
function
(
seriesArray
)
{
if
(
seriesArray
.
length
===
0
)
{
return
;
}
var
series
=
this
.
series
;
var
series
=
this
.
series
;
var
seriesIndex
;
var
seriesIndex
;
var
serie
;
var
serie
;
...
@@ -384,7 +383,6 @@ define(function (require) {
...
@@ -384,7 +383,6 @@ define(function (require) {
'
vertical
'
'
vertical
'
);
);
itemShape
.
zlevel
=
this
.
_zlevelBase
;
itemShape
.
zlevel
=
this
.
_zlevelBase
;
itemShape
.
_mark
=
false
;
// 非mark
itemShape
.
_main
=
true
;
itemShape
.
_main
=
true
;
return
itemShape
;
return
itemShape
;
},
},
...
@@ -459,7 +457,7 @@ define(function (require) {
...
@@ -459,7 +457,7 @@ define(function (require) {
this
.
option
=
newOption
;
this
.
option
=
newOption
;
this
.
series
=
newOption
.
series
;
this
.
series
=
newOption
.
series
;
}
}
this
.
clear
();
this
.
backupShapeList
();
this
.
_buildShape
();
this
.
_buildShape
();
},
},
...
@@ -480,6 +478,10 @@ define(function (require) {
...
@@ -480,6 +478,10 @@ define(function (require) {
* 动画设定
* 动画设定
*/
*/
animation
:
function
()
{
animation
:
function
()
{
if
(
this
.
lastShapeList
&&
this
.
lastShapeList
.
length
>
0
)
{
return
;
}
var
series
=
this
.
series
;
var
series
=
this
.
series
;
var
duration
=
this
.
query
(
this
.
option
,
'
animationDuration
'
);
var
duration
=
this
.
query
(
this
.
option
,
'
animationDuration
'
);
var
easing
=
this
.
query
(
this
.
option
,
'
animationEasing
'
);
var
easing
=
this
.
query
(
this
.
option
,
'
animationEasing
'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录