Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
006c1f0b
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,发现更多精彩内容 >>
提交
006c1f0b
编写于
5月 31, 2016
作者:
L
lang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add progressive rendering for large chart. Add animationThreshold
上级
0076a7f0
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
57 addition
and
18 deletion
+57
-18
src/chart/heatmap/HeatmapSeries.js
src/chart/heatmap/HeatmapSeries.js
+2
-0
src/chart/helper/Symbol.js
src/chart/helper/Symbol.js
+2
-2
src/chart/scatter/ScatterSeries.js
src/chart/scatter/ScatterSeries.js
+2
-0
src/echarts.js
src/echarts.js
+22
-2
src/model/Series.js
src/model/Series.js
+13
-0
src/model/globalDefault.js
src/model/globalDefault.js
+10
-11
src/util/graphic.js
src/util/graphic.js
+4
-1
src/visual/symbol.js
src/visual/symbol.js
+2
-2
未找到文件。
src/chart/heatmap/HeatmapSeries.js
浏览文件 @
006c1f0b
...
...
@@ -23,6 +23,8 @@ define(function (require) {
xAxisIndex
:
0
,
yAxisIndex
:
0
,
progressive
:
500
,
// Geo coordinate system
geoIndex
:
0
,
...
...
src/chart/helper/Symbol.js
浏览文件 @
006c1f0b
...
...
@@ -195,7 +195,7 @@ define(function (require) {
dataType
===
'
ordinal
'
||
dataType
===
'
time
'
))
{}
// jshint ignore:line
if
(
valueDim
!=
null
&&
labelModel
.
get
(
'
show
'
))
{
if
(
valueDim
!=
null
&&
labelModel
.
get
Shallow
(
'
show
'
))
{
graphic
.
setText
(
elStyle
,
labelModel
,
color
);
elStyle
.
text
=
zrUtil
.
retrieve
(
seriesModel
.
getFormattedLabel
(
idx
,
'
normal
'
),
...
...
@@ -226,7 +226,7 @@ define(function (require) {
graphic
.
setHoverStyle
(
symbolPath
,
hoverStyle
);
if
(
itemModel
.
getShallow
(
'
hoverAnimation
'
))
{
if
(
itemModel
.
getShallow
(
'
hoverAnimation
'
)
&&
seriesModel
.
ifEnableAnimation
()
)
{
var
onEmphasis
=
function
()
{
var
ratio
=
size
[
1
]
/
size
[
0
];
this
.
animateTo
({
...
...
src/chart/scatter/ScatterSeries.js
浏览文件 @
006c1f0b
...
...
@@ -41,6 +41,8 @@ define(function (require) {
// Available when large is true
largeThreshold
:
2000
,
progressive
:
500
,
// label: {
// normal: {
// show: false
...
...
src/echarts.js
浏览文件 @
006c1f0b
...
...
@@ -817,6 +817,24 @@ define(function (require) {
chartView
.
group
.
silent
=
!!
seriesModel
.
get
(
'
silent
'
);
updateZ
(
seriesModel
,
chartView
);
// Progressive configuration
var
data
=
seriesModel
.
getData
();
var
elCount
=
0
;
// FIXME edge data ?
var
frameCount
=
+
seriesModel
.
get
(
'
progressive
'
);
var
needProgressive
=
data
.
count
()
>
seriesModel
.
get
(
'
progressiveThreshold
'
)
&&
frameCount
;
if
(
needProgressive
)
{
chartView
.
group
.
traverse
(
function
(
el
)
{
if
(
el
.
type
!==
'
group
'
)
{
el
.
progressive
=
needProgressive
?
Math
.
floor
(
elCount
++
/ frameCount
)
: -1
;
if
(
needProgressive
)
{
el
.
stopAnimation
(
true
);
}
}
});
}
},
this
);
// Remove groups of unrendered charts
...
...
@@ -904,8 +922,10 @@ define(function (require) {
var
zlevel
=
model
.
get
(
'
zlevel
'
);
// Set z and zlevel
view
.
group
.
traverse
(
function
(
el
)
{
z
!=
null
&&
(
el
.
z
=
z
);
zlevel
!=
null
&&
(
el
.
zlevel
=
zlevel
);
if
(
el
.
type
!==
'
group
'
)
{
z
!=
null
&&
(
el
.
z
=
z
);
zlevel
!=
null
&&
(
el
.
zlevel
=
zlevel
);
}
});
}
/**
...
...
src/model/Series.js
浏览文件 @
006c1f0b
...
...
@@ -202,6 +202,19 @@ define(function(require) {
:
(
colorEl
+
encodeHTML
(
this
.
name
)
+
'
:
'
+
formattedValue
);
},
/**
* @return {boolean}
*/
ifEnableAnimation
:
function
()
{
var
animationEnabled
=
this
.
getShallow
(
'
animation
'
);
if
(
animationEnabled
)
{
if
(
this
.
getData
().
count
()
>
this
.
getShallow
(
'
animationThreshold
'
))
{
animationEnabled
=
false
;
}
}
return
animationEnabled
;
},
restoreData
:
function
()
{
this
.
_data
=
this
.
_dataBeforeProcessed
.
cloneShallow
();
},
...
...
src/model/globalDefault.js
浏览文件 @
006c1f0b
...
...
@@ -29,16 +29,15 @@ define(function () {
fontStyle
:
'
normal
'
,
fontWeight
:
'
normal
'
},
// 主题,默认标志图形类型列表
// symbolList: [
// 'circle', 'rectangle', 'triangle', 'diamond',
// 'emptyCircle', 'emptyRectangle', 'emptyTriangle', 'emptyDiamond'
// ],
animation
:
true
,
// 过渡动画是否开启
animationThreshold
:
2000
,
// 动画元素阀值,产生的图形原素超过2000不出动画
animationDuration
:
1000
,
// 过渡动画参数:进入
animationDurationUpdate
:
300
,
// 过渡动画参数:更新
animationEasing
:
'
exponentialOut
'
,
//BounceOut
animationEasingUpdate
:
'
cubicOut
'
animation
:
true
,
animationThreshold
:
2000
,
animationDuration
:
1000
,
animationDurationUpdate
:
300
,
animationEasing
:
'
exponentialOut
'
,
animationEasingUpdate
:
'
cubicOut
'
,
// Progressive configuration
progressiveThreshold
:
2000
,
progressive
:
100
};
});
\ No newline at end of file
src/util/graphic.js
浏览文件 @
006c1f0b
...
...
@@ -376,6 +376,9 @@ define(function(require) {
cb
=
dataIndex
;
dataIndex
=
null
;
}
var
animationEnabled
=
animatableModel
&&
animatableModel
.
ifEnableAnimation
&&
animatableModel
.
ifEnableAnimation
();
var
postfix
=
isUpdate
?
'
Update
'
:
''
;
var
duration
=
animatableModel
...
...
@@ -388,7 +391,7 @@ define(function(require) {
animationDelay
=
animationDelay
(
dataIndex
);
}
animat
ableModel
&&
animatableModel
.
getShallow
(
'
animation
'
)
animat
ionEnabled
&&
duration
>
0
?
el
.
animateTo
(
props
,
duration
,
animationDelay
||
0
,
animationEasing
,
cb
)
:
(
el
.
attr
(
props
),
cb
&&
cb
());
}
...
...
src/visual/symbol.js
浏览文件 @
006c1f0b
...
...
@@ -27,8 +27,8 @@ define(function (require) {
}
data
.
each
(
function
(
idx
)
{
var
itemModel
=
data
.
getItemModel
(
idx
);
var
itemSymbolType
=
itemModel
.
get
(
'
symbol
'
,
true
);
var
itemSymbolSize
=
itemModel
.
get
(
'
symbolSize
'
,
true
);
var
itemSymbolType
=
itemModel
.
get
Shallow
(
'
symbol
'
,
true
);
var
itemSymbolSize
=
itemModel
.
get
Shallow
(
'
symbolSize
'
,
true
);
// If has item symbol
if
(
itemSymbolType
!=
null
)
{
data
.
setItemVisual
(
idx
,
'
symbol
'
,
itemSymbolType
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录