Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
e7e3cfe2
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,发现更多精彩内容 >>
提交
e7e3cfe2
编写于
2月 10, 2018
作者:
S
sushuang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove stack from data API.
上级
bf0df088
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
34 addition
and
39 deletion
+34
-39
src/chart/candlestick/candlestickLayout.js
src/chart/candlestick/candlestickLayout.js
+1
-1
src/chart/pie/pieLayout.js
src/chart/pie/pieLayout.js
+1
-1
src/component/marker/markerHelper.js
src/component/marker/markerHelper.js
+1
-1
src/component/visualMap/ContinuousModel.js
src/component/visualMap/ContinuousModel.js
+1
-1
src/component/visualMap/PiecewiseModel.js
src/component/visualMap/PiecewiseModel.js
+1
-1
src/data/List.js
src/data/List.js
+26
-31
src/processor/dataFilter.js
src/processor/dataFilter.js
+1
-1
src/visual/visualSolution.js
src/visual/visualSolution.js
+2
-2
未找到文件。
src/chart/candlestick/candlestickLayout.js
浏览文件 @
e7e3cfe2
...
@@ -146,7 +146,7 @@ export default function (ecModel) {
...
@@ -146,7 +146,7 @@ export default function (ecModel) {
return
point
;
return
point
;
}
}
}
,
true
);
});
});
});
}
}
...
...
src/chart/pie/pieLayout.js
浏览文件 @
e7e3cfe2
...
@@ -108,7 +108,7 @@ export default function (seriesType, ecModel, api, payload) {
...
@@ -108,7 +108,7 @@ export default function (seriesType, ecModel, api, payload) {
});
});
currentAngle
=
endAngle
;
currentAngle
=
endAngle
;
}
,
true
);
});
// Some sector is constrained by minAngle
// Some sector is constrained by minAngle
// Rest sectors needs recalculate angle
// Rest sectors needs recalculate angle
...
...
src/component/marker/markerHelper.js
浏览文件 @
e7e3cfe2
...
@@ -209,7 +209,7 @@ export function numCalculate(data, valueDataDim, type) {
...
@@ -209,7 +209,7 @@ export function numCalculate(data, valueDataDim, type) {
sum
+=
val
;
sum
+=
val
;
count
++
;
count
++
;
}
}
}
,
true
);
});
return
sum
/
count
;
return
sum
/
count
;
}
}
else
{
else
{
...
...
src/component/visualMap/ContinuousModel.js
浏览文件 @
e7e3cfe2
...
@@ -151,7 +151,7 @@ var ContinuousModel = VisualMapModel.extend({
...
@@ -151,7 +151,7 @@ var ContinuousModel = VisualMapModel.extend({
data
.
each
(
this
.
getDataDimension
(
data
),
function
(
value
,
dataIndex
)
{
data
.
each
(
this
.
getDataDimension
(
data
),
function
(
value
,
dataIndex
)
{
range
[
0
]
<=
value
&&
value
<=
range
[
1
]
&&
dataIndices
.
push
(
dataIndex
);
range
[
0
]
<=
value
&&
value
<=
range
[
1
]
&&
dataIndices
.
push
(
dataIndex
);
},
t
rue
,
t
his
);
},
this
);
result
.
push
({
seriesId
:
seriesModel
.
id
,
dataIndex
:
dataIndices
});
result
.
push
({
seriesId
:
seriesModel
.
id
,
dataIndex
:
dataIndices
});
},
this
);
},
this
);
...
...
src/component/visualMap/PiecewiseModel.js
浏览文件 @
e7e3cfe2
...
@@ -265,7 +265,7 @@ var PiecewiseModel = VisualMapModel.extend({
...
@@ -265,7 +265,7 @@ var PiecewiseModel = VisualMapModel.extend({
// Should always base on model pieceList, because it is order sensitive.
// Should always base on model pieceList, because it is order sensitive.
var
pIdx
=
VisualMapping
.
findPieceIndex
(
value
,
this
.
_pieceList
);
var
pIdx
=
VisualMapping
.
findPieceIndex
(
value
,
this
.
_pieceList
);
pIdx
===
pieceIndex
&&
dataIndices
.
push
(
dataIndex
);
pIdx
===
pieceIndex
&&
dataIndices
.
push
(
dataIndex
);
},
t
rue
,
t
his
);
},
this
);
result
.
push
({
seriesId
:
seriesModel
.
id
,
dataIndex
:
dataIndices
});
result
.
push
({
seriesId
:
seriesModel
.
id
,
dataIndex
:
dataIndices
});
},
this
);
},
this
);
...
...
src/data/List.js
浏览文件 @
e7e3cfe2
...
@@ -75,7 +75,6 @@ function transferProperties(a, b) {
...
@@ -75,7 +75,6 @@ function transferProperties(a, b) {
* Dimensions should be concrete names like x, y, z, lng, lat, angle, radius
* Dimensions should be concrete names like x, y, z, lng, lat, angle, radius
* Spetial fields: {
* Spetial fields: {
* ordinalMeta: <module:echarts/data/OrdinalMeta>
* ordinalMeta: <module:echarts/data/OrdinalMeta>
* stackable: <boolean>
* createInvertedIndices: <boolean>
* createInvertedIndices: <boolean>
* }
* }
* @param {module:echarts/model/Model} hostModel
* @param {module:echarts/model/Model} hostModel
...
@@ -844,7 +843,6 @@ listProto.setCalculationInfo = function (key, value) {
...
@@ -844,7 +843,6 @@ listProto.setCalculationInfo = function (key, value) {
/**
/**
* Get sum of data in one dimension
* Get sum of data in one dimension
* @param {string} dim
* @param {string} dim
* @param {boolean} stack
*/
*/
listProto
.
getSum
=
function
(
dim
/*, stack */
)
{
listProto
.
getSum
=
function
(
dim
/*, stack */
)
{
var
dimData
=
this
.
_storage
[
dim
];
var
dimData
=
this
.
_storage
[
dim
];
...
@@ -967,11 +965,10 @@ listProto.indexOfRawIndex = function (rawIndex) {
...
@@ -967,11 +965,10 @@ listProto.indexOfRawIndex = function (rawIndex) {
* Retreive the index of nearest value
* Retreive the index of nearest value
* @param {string} dim
* @param {string} dim
* @param {number} value
* @param {number} value
* @param {boolean} stack If given value is after stacked
* @param {number} [maxDistance=Infinity]
* @param {number} [maxDistance=Infinity]
* @return {Array.<number>} Considere multiple points has the same value.
* @return {Array.<number>} Considere multiple points has the same value.
*/
*/
listProto
.
indicesOfNearest
=
function
(
dim
,
value
,
/*, stack, */
maxDistance
)
{
listProto
.
indicesOfNearest
=
function
(
dim
,
value
,
maxDistance
)
{
var
storage
=
this
.
_storage
;
var
storage
=
this
.
_storage
;
var
dimData
=
storage
[
dim
];
var
dimData
=
storage
[
dim
];
var
nearestIndices
=
[];
var
nearestIndices
=
[];
...
@@ -1102,8 +1099,7 @@ function validateDimensions(list, dims) {
...
@@ -1102,8 +1099,7 @@ function validateDimensions(list, dims) {
* list.each(['x', 'y'], function (x, y, idx) {});
* list.each(['x', 'y'], function (x, y, idx) {});
* list.each(function (idx) {})
* list.each(function (idx) {})
*/
*/
// FIXME ???? remove stack
listProto
.
each
=
function
(
dims
,
cb
,
context
,
contextCompat
)
{
listProto
.
each
=
function
(
dims
,
cb
,
stack
,
context
)
{
'
use strict
'
;
'
use strict
'
;
if
(
!
this
.
_count
)
{
if
(
!
this
.
_count
)
{
...
@@ -1111,12 +1107,15 @@ listProto.each = function (dims, cb, stack, context) {
...
@@ -1111,12 +1107,15 @@ listProto.each = function (dims, cb, stack, context) {
}
}
if
(
typeof
dims
===
'
function
'
)
{
if
(
typeof
dims
===
'
function
'
)
{
context
=
stack
;
context
Compat
=
context
;
stack
=
cb
;
context
=
cb
;
cb
=
dims
;
cb
=
dims
;
dims
=
[];
dims
=
[];
}
}
// contextCompat just for compat echarts3
context
=
context
||
contextCompat
||
this
;
dims
=
zrUtil
.
map
(
normalizeDimensions
(
dims
),
this
.
getDimension
,
this
);
dims
=
zrUtil
.
map
(
normalizeDimensions
(
dims
),
this
.
getDimension
,
this
);
if
(
__DEV__
)
{
if
(
__DEV__
)
{
...
@@ -1125,8 +1124,6 @@ listProto.each = function (dims, cb, stack, context) {
...
@@ -1125,8 +1124,6 @@ listProto.each = function (dims, cb, stack, context) {
var
dimSize
=
dims
.
length
;
var
dimSize
=
dims
.
length
;
context
=
context
||
this
;
for
(
var
i
=
0
;
i
<
this
.
count
();
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
count
();
i
++
)
{
// Simple optimization
// Simple optimization
switch
(
dimSize
)
{
switch
(
dimSize
)
{
...
@@ -1134,16 +1131,16 @@ listProto.each = function (dims, cb, stack, context) {
...
@@ -1134,16 +1131,16 @@ listProto.each = function (dims, cb, stack, context) {
cb
.
call
(
context
,
i
);
cb
.
call
(
context
,
i
);
break
;
break
;
case
1
:
case
1
:
cb
.
call
(
context
,
this
.
get
(
dims
[
0
],
i
/*, stack */
),
i
);
cb
.
call
(
context
,
this
.
get
(
dims
[
0
],
i
),
i
);
break
;
break
;
case
2
:
case
2
:
cb
.
call
(
context
,
this
.
get
(
dims
[
0
],
i
/*, stack */
),
this
.
get
(
dims
[
1
],
i
/*, stack */
),
i
);
cb
.
call
(
context
,
this
.
get
(
dims
[
0
],
i
),
this
.
get
(
dims
[
1
],
i
),
i
);
break
;
break
;
default
:
default
:
var
k
=
0
;
var
k
=
0
;
var
value
=
[];
var
value
=
[];
for
(;
k
<
dimSize
;
k
++
)
{
for
(;
k
<
dimSize
;
k
++
)
{
value
[
k
]
=
this
.
get
(
dims
[
k
],
i
/*, stack */
);
value
[
k
]
=
this
.
get
(
dims
[
k
],
i
);
}
}
// Index
// Index
value
[
k
]
=
i
;
value
[
k
]
=
i
;
...
@@ -1156,11 +1153,9 @@ listProto.each = function (dims, cb, stack, context) {
...
@@ -1156,11 +1153,9 @@ listProto.each = function (dims, cb, stack, context) {
* Data filter
* Data filter
* @param {string|Array.<string>}
* @param {string|Array.<string>}
* @param {Function} cb
* @param {Function} cb
* @param {boolean} [stack=false]
* @param {*} [context=this]
* @param {*} [context=this]
*/
*/
// ???? REMOVE STACK
listProto
.
filterSelf
=
function
(
dimensions
,
cb
,
context
,
contextCompat
)
{
listProto
.
filterSelf
=
function
(
dimensions
,
cb
,
stack
,
context
)
{
'
use strict
'
;
'
use strict
'
;
if
(
!
this
.
_count
)
{
if
(
!
this
.
_count
)
{
...
@@ -1168,14 +1163,14 @@ listProto.filterSelf = function (dimensions, cb, stack, context) {
...
@@ -1168,14 +1163,14 @@ listProto.filterSelf = function (dimensions, cb, stack, context) {
}
}
if
(
typeof
dimensions
===
'
function
'
)
{
if
(
typeof
dimensions
===
'
function
'
)
{
context
=
stack
;
context
Compat
=
context
;
stack
=
cb
;
context
=
cb
;
cb
=
dimensions
;
cb
=
dimensions
;
dimensions
=
[];
dimensions
=
[];
}
}
stack
=
stack
||
false
;
context
=
context
||
this
;
// contextCompat just for compat echarts3
context
=
context
||
contextCompat
||
this
;
dimensions
=
zrUtil
.
map
(
dimensions
=
zrUtil
.
map
(
normalizeDimensions
(
dimensions
),
this
.
getDimension
,
this
normalizeDimensions
(
dimensions
),
this
.
getDimension
,
this
...
@@ -1203,13 +1198,11 @@ listProto.filterSelf = function (dimensions, cb, stack, context) {
...
@@ -1203,13 +1198,11 @@ listProto.filterSelf = function (dimensions, cb, stack, context) {
keep
=
cb
.
call
(
context
,
i
);
keep
=
cb
.
call
(
context
,
i
);
}
}
else
if
(
dimSize
===
1
)
{
else
if
(
dimSize
===
1
)
{
// var val = stack ? this.get(dim0, i, true) : this._getFast(dim0, rawIdx);
var
val
=
this
.
_getFast
(
dim0
,
rawIdx
);
var
val
=
this
.
_getFast
(
dim0
,
rawIdx
);
keep
=
cb
.
call
(
context
,
val
,
i
);
keep
=
cb
.
call
(
context
,
val
,
i
);
}
}
else
{
else
{
for
(
var
k
=
0
;
k
<
dimSize
;
k
++
)
{
for
(
var
k
=
0
;
k
<
dimSize
;
k
++
)
{
// value[k] = stack ? this.get(dimensions[k], i, true) : this._getFast(dim0, rawIdx);
value
[
k
]
=
this
.
_getFast
(
dim0
,
rawIdx
);
value
[
k
]
=
this
.
_getFast
(
dim0
,
rawIdx
);
}
}
value
[
k
]
=
i
;
value
[
k
]
=
i
;
...
@@ -1360,25 +1353,26 @@ listProto.selectRange = function (range /*, stack */) {
...
@@ -1360,25 +1353,26 @@ listProto.selectRange = function (range /*, stack */) {
* Data mapping to a plain array
* Data mapping to a plain array
* @param {string|Array.<string>} [dimensions]
* @param {string|Array.<string>} [dimensions]
* @param {Function} cb
* @param {Function} cb
* @param {boolean} [stack=false]
* @param {*} [context=this]
* @param {*} [context=this]
* @return {Array}
* @return {Array}
*/
*/
// ??? REMOVE STACK
listProto
.
mapArray
=
function
(
dimensions
,
cb
,
context
,
contextCompat
)
{
listProto
.
mapArray
=
function
(
dimensions
,
cb
,
stack
,
context
)
{
'
use strict
'
;
'
use strict
'
;
if
(
typeof
dimensions
===
'
function
'
)
{
if
(
typeof
dimensions
===
'
function
'
)
{
context
=
stack
;
context
Compat
=
context
;
stack
=
cb
;
context
=
cb
;
cb
=
dimensions
;
cb
=
dimensions
;
dimensions
=
[];
dimensions
=
[];
}
}
// contextCompat just for compat echarts3
context
=
context
||
contextCompat
||
this
;
var
result
=
[];
var
result
=
[];
this
.
each
(
dimensions
,
function
()
{
this
.
each
(
dimensions
,
function
()
{
result
.
push
(
cb
&&
cb
.
apply
(
this
,
arguments
));
result
.
push
(
cb
&&
cb
.
apply
(
this
,
arguments
));
},
stack
,
context
);
},
context
);
return
result
;
return
result
;
};
};
...
@@ -1429,14 +1423,15 @@ function getInitialExtent() {
...
@@ -1429,14 +1423,15 @@ function getInitialExtent() {
* Data mapping to a new List with given dimensions
* Data mapping to a new List with given dimensions
* @param {string|Array.<string>} dimensions
* @param {string|Array.<string>} dimensions
* @param {Function} cb
* @param {Function} cb
* @param {boolean} [stack=false]
* @param {*} [context=this]
* @param {*} [context=this]
* @return {Array}
* @return {Array}
*/
*/
// ???? REMOVE STACK
listProto
.
map
=
function
(
dimensions
,
cb
,
context
,
contextCompat
)
{
listProto
.
map
=
function
(
dimensions
,
cb
,
stack
,
context
)
{
'
use strict
'
;
'
use strict
'
;
// contextCompat just for compat echarts3
context
=
context
||
contextCompat
||
this
;
dimensions
=
zrUtil
.
map
(
dimensions
=
zrUtil
.
map
(
normalizeDimensions
(
dimensions
),
this
.
getDimension
,
this
normalizeDimensions
(
dimensions
),
this
.
getDimension
,
this
);
);
...
...
src/processor/dataFilter.js
浏览文件 @
e7e3cfe2
...
@@ -18,7 +18,7 @@ export default function (seriesType) {
...
@@ -18,7 +18,7 @@ export default function (seriesType) {
}
}
}
}
return
true
;
return
true
;
}
,
this
);
});
}
}
};
};
}
}
\ No newline at end of file
src/visual/visualSolution.js
浏览文件 @
e7e3cfe2
...
@@ -115,10 +115,10 @@ export function applyVisual(stateList, visualMappings, data, getValueState, scop
...
@@ -115,10 +115,10 @@ export function applyVisual(stateList, visualMappings, data, getValueState, scop
}
}
if
(
dimension
==
null
)
{
if
(
dimension
==
null
)
{
data
.
each
(
eachItem
,
true
);
data
.
each
(
eachItem
);
}
}
else
{
else
{
data
.
each
([
dimension
],
eachItem
,
true
);
data
.
each
([
dimension
],
eachItem
);
}
}
function
eachItem
(
valueOrIndex
,
index
)
{
function
eachItem
(
valueOrIndex
,
index
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录