Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
missman
incubator-echarts
提交
a4760703
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,发现更多精彩内容 >>
提交
a4760703
编写于
12月 29, 2017
作者:
S
sushuang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'next' of
https://github.com/100pah/echarts
into next
上级
3e9c948f
52b3816b
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
83 addition
and
5 deletion
+83
-5
src/chart/custom.js
src/chart/custom.js
+22
-0
src/chart/heatmap/HeatmapView.js
src/chart/heatmap/HeatmapView.js
+0
-1
src/component/dataZoom/SliderZoomView.js
src/component/dataZoom/SliderZoomView.js
+3
-0
src/data/List.js
src/data/List.js
+41
-1
src/echarts.js
src/echarts.js
+8
-2
test/custom-bmap-grid.html
test/custom-bmap-grid.html
+9
-1
未找到文件。
src/chart/custom.js
浏览文件 @
a4760703
...
...
@@ -122,6 +122,26 @@ echarts.extendChartView({
this
.
_data
=
data
;
},
incrementalPrepareRender
:
function
(
customSeries
,
ecModel
,
api
)
{
this
.
group
.
removeAll
();
this
.
_data
=
null
;
},
incrementalRender
:
function
(
params
,
customSeries
,
ecModel
,
api
)
{
var
data
=
customSeries
.
getData
();
var
renderItem
=
makeRenderItem
(
customSeries
,
data
,
ecModel
,
api
);
function
setIncrementalAndHoverLayer
(
el
)
{
if
(
!
el
.
isGroup
)
{
el
.
incremental
=
true
;
el
.
useHoverLayer
=
true
;
}
}
for
(
var
idx
=
params
.
start
;
idx
<
params
.
end
;
idx
++
)
{
var
el
=
createOrUpdate
(
null
,
idx
,
renderItem
(
idx
),
customSeries
,
this
.
group
,
data
);
el
.
traverse
(
setIncrementalAndHoverLayer
);
}
},
/**
* @override
*/
...
...
@@ -457,6 +477,8 @@ function wrapEncodeDef(data) {
function
createOrUpdate
(
el
,
dataIndex
,
elOption
,
animatableModel
,
group
,
data
)
{
el
=
doCreateOrUpdate
(
el
,
dataIndex
,
elOption
,
animatableModel
,
group
,
data
);
el
&&
data
.
setItemGraphicEl
(
dataIndex
,
el
);
return
el
;
}
function
doCreateOrUpdate
(
el
,
dataIndex
,
elOption
,
animatableModel
,
group
,
data
)
{
...
...
src/chart/heatmap/HeatmapView.js
浏览文件 @
a4760703
...
...
@@ -222,7 +222,6 @@ export default echarts.extendChartView({
rect
.
incremental
=
incremental
;
// PENDING
if
(
incremental
)
{
rect
.
needsClear
=
start
===
0
;
// Rect must use hover layer if it's incremental.
rect
.
useHoverLayer
=
true
;
}
...
...
src/component/dataZoom/SliderZoomView.js
浏览文件 @
a4760703
...
...
@@ -397,10 +397,13 @@ var SliderZoomView = DataZoomView.extend({
var
otherDim
=
getOtherDim
(
dimNames
.
name
);
var
otherAxisInverse
;
var
coordSys
=
seriesModel
.
coordinateSystem
;
if
(
otherDim
!=
null
&&
coordSys
.
getOtherAxis
)
{
otherAxisInverse
=
coordSys
.
getOtherAxis
(
thisAxis
).
inverse
;
}
otherDim
=
seriesModel
.
coordDimToDataDim
(
otherDim
)[
0
];
result
=
{
thisAxis
:
thisAxis
,
series
:
seriesModel
,
...
...
src/data/List.js
浏览文件 @
a4760703
...
...
@@ -595,10 +595,14 @@ listProto.get = function (dim, idx, stack) {
if
(
idx
<
0
||
idx
>=
this
.
_count
)
{
return
NaN
;
}
var
storage
=
this
.
_storage
;
if
(
!
storage
[
dim
])
{
// TODO Warn ?
return
NaN
;
}
idx
=
this
.
getRawIndex
(
idx
);
var
storage
=
this
.
_storage
;
var
chunkIndex
=
Math
.
floor
(
idx
/
this
.
_chunkSize
);
var
chunkOffset
=
idx
%
this
.
_chunkSize
;
...
...
@@ -957,6 +961,14 @@ function normalizeDimensions(dimensions) {
return
dimensions
;
}
function
validateDimensions
(
list
,
dims
)
{
for
(
var
i
=
0
;
i
<
dims
.
length
;
i
++
)
{
if
(
!
list
.
_storage
[
dims
[
i
]])
{
console
.
error
(
'
Unkown dimension
'
+
dims
[
i
]);
}
}
}
/**
* Data iteration
* @param {string|Array.<string>}
...
...
@@ -970,6 +982,8 @@ function normalizeDimensions(dimensions) {
* list.each(function (idx) {})
*/
listProto
.
each
=
function
(
dims
,
cb
,
stack
,
context
)
{
'
use strict
'
;
if
(
typeof
dims
===
'
function
'
)
{
context
=
stack
;
stack
=
cb
;
...
...
@@ -979,6 +993,10 @@ listProto.each = function (dims, cb, stack, context) {
dims
=
zrUtil
.
map
(
normalizeDimensions
(
dims
),
this
.
getDimension
,
this
);
if
(
__DEV__
)
{
validateDimensions
(
this
,
dims
);
}
var
dimSize
=
dims
.
length
;
context
=
context
||
this
;
...
...
@@ -1032,6 +1050,11 @@ listProto.filterSelf = function (dimensions, cb, stack, context) {
normalizeDimensions
(
dimensions
),
this
.
getDimension
,
this
);
if
(
__DEV__
)
{
validateDimensions
(
this
,
dimensions
);
}
var
count
=
this
.
count
();
var
Ctor
=
getIndicesCtor
(
count
);
var
newIndices
=
new
Ctor
(
count
);
...
...
@@ -1091,6 +1114,11 @@ listProto.selectRange = function (range, stack) {
dimensions
.
push
(
dim
);
}
}
if
(
__DEV__
)
{
validateDimensions
(
this
,
dimensions
);
}
var
dimSize
=
dimensions
.
length
;
if
(
!
dimSize
)
{
return
;
...
...
@@ -1154,6 +1182,8 @@ listProto.selectRange = function (range, stack) {
* @return {Array}
*/
listProto
.
mapArray
=
function
(
dimensions
,
cb
,
stack
,
context
)
{
'
use strict
'
;
if
(
typeof
dimensions
===
'
function
'
)
{
context
=
stack
;
stack
=
cb
;
...
...
@@ -1161,6 +1191,10 @@ listProto.mapArray = function (dimensions, cb, stack, context) {
dimensions
=
[];
}
if
(
__DEV__
)
{
validateDimensions
(
this
,
dimensions
);
}
var
result
=
[];
this
.
each
(
dimensions
,
function
()
{
result
.
push
(
cb
&&
cb
.
apply
(
this
,
arguments
));
...
...
@@ -1208,10 +1242,16 @@ function cloneDimStore(originalDimStore) {
* @return {Array}
*/
listProto
.
map
=
function
(
dimensions
,
cb
,
stack
,
context
)
{
'
use strict
'
;
dimensions
=
zrUtil
.
map
(
normalizeDimensions
(
dimensions
),
this
.
getDimension
,
this
);
if
(
__DEV__
)
{
validateDimensions
(
this
,
dimensions
);
}
var
list
=
cloneListForMapAndSample
(
this
,
dimensions
);
// Following properties are all immutable.
...
...
src/echarts.js
浏览文件 @
a4760703
...
...
@@ -1570,11 +1570,17 @@ function updateBlend(seriesModel, chartView) {
chartView
.
group
.
traverse
(
function
(
el
)
{
// FIXME marker and other components
if
(
!
el
.
isGroup
)
{
el
.
setStyle
(
'
blend
'
,
blendMode
);
// Only set if blendMode is changed. In case element is incremental and don't wan't to rerender.
if
(
el
.
style
.
blend
!==
blendMode
)
{
el
.
setStyle
(
'
blend
'
,
blendMode
);
}
}
if
(
el
.
eachPendingDisplayable
)
{
el
.
eachPendingDisplayable
(
function
(
displayable
)
{
displayable
.
setStyle
(
'
blend
'
,
blendMode
);
// Only set if blendMode is changed. In case element is incremental and don't wan't to rerender.
if
(
el
.
style
.
blend
!==
blendMode
)
{
el
.
setStyle
(
'
blend
'
,
blendMode
);
}
});
}
});
...
...
test/custom-bmap-grid.html
浏览文件 @
a4760703
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录