Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
半栈学徒
incubator-echarts
提交
81fb75ed
I
incubator-echarts
项目概览
半栈学徒
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
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,发现更多精彩内容 >>
提交
81fb75ed
编写于
3月 26, 2018
作者:
S
sushuang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix sampling in stream.
上级
7d62bf3e
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
88 addition
and
9 deletion
+88
-9
src/component/dataZoom/dataZoomProcessor.js
src/component/dataZoom/dataZoomProcessor.js
+1
-1
src/model/Series.js
src/model/Series.js
+1
-1
src/processor/dataSample.js
src/processor/dataSample.js
+4
-0
src/stream/Scheduler.js
src/stream/Scheduler.js
+3
-3
src/stream/task.js
src/stream/task.js
+0
-4
test/line-large.html
test/line-large.html
+79
-0
未找到文件。
src/component/dataZoom/dataZoomProcessor.js
浏览文件 @
81fb75ed
...
@@ -21,7 +21,7 @@ echarts.registerProcessor({
...
@@ -21,7 +21,7 @@ echarts.registerProcessor({
return
seriesModelMap
;
return
seriesModelMap
;
},
},
isOverallFilter
:
true
,
modifyOutputEnd
:
true
,
// Consider appendData, where filter should be performed. Because data process is
// Consider appendData, where filter should be performed. Because data process is
// in block mode currently, it is not need to worry about that the overallProgress
// in block mode currently, it is not need to worry about that the overallProgress
...
...
src/model/Series.js
浏览文件 @
81fb75ed
...
@@ -231,7 +231,7 @@ var SeriesModel = ComponentModel.extend({
...
@@ -231,7 +231,7 @@ var SeriesModel = ComponentModel.extend({
if
(
task
)
{
if
(
task
)
{
var
context
=
task
.
context
;
var
context
=
task
.
context
;
// Consider case: filter, data sample.
// Consider case: filter, data sample.
if
(
context
.
data
!==
data
&&
task
.
isOverallFilter
)
{
if
(
context
.
data
!==
data
&&
task
.
modifyOutputEnd
)
{
task
.
setOutputEnd
(
data
.
count
());
task
.
setOutputEnd
(
data
.
count
());
}
}
context
.
outputData
=
data
;
context
.
outputData
=
data
;
...
...
src/processor/dataSample.js
浏览文件 @
81fb75ed
...
@@ -47,7 +47,11 @@ var indexSampler = function (frame, value) {
...
@@ -47,7 +47,11 @@ var indexSampler = function (frame, value) {
export
default
function
(
seriesType
)
{
export
default
function
(
seriesType
)
{
return
{
return
{
seriesType
:
seriesType
,
seriesType
:
seriesType
,
modifyOutputEnd
:
true
,
reset
:
function
(
seriesModel
,
ecModel
,
api
)
{
reset
:
function
(
seriesModel
,
ecModel
,
api
)
{
var
data
=
seriesModel
.
getData
();
var
data
=
seriesModel
.
getData
();
var
sampling
=
seriesModel
.
get
(
'
sampling
'
);
var
sampling
=
seriesModel
.
get
(
'
sampling
'
);
...
...
src/stream/Scheduler.js
浏览文件 @
81fb75ed
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @module echarts/stream/Scheduler
* @module echarts/stream/Scheduler
*/
*/
import
{
each
,
is
Array
,
isFunction
,
createHashMap
,
noop
,
assert
}
from
'
zrender/src/core/util
'
;
import
{
each
,
is
Function
,
createHashMap
,
noop
}
from
'
zrender/src/core/util
'
;
import
{
createTask
}
from
'
./task
'
;
import
{
createTask
}
from
'
./task
'
;
import
{
getUID
}
from
'
../util/component
'
;
import
{
getUID
}
from
'
../util/component
'
;
import
GlobalModel
from
'
../model/Global
'
;
import
GlobalModel
from
'
../model/Global
'
;
...
@@ -347,7 +347,7 @@ function createOverallStageTask(scheduler, stageHandler, stageHandlerRecord, ecM
...
@@ -347,7 +347,7 @@ function createOverallStageTask(scheduler, stageHandler, stageHandlerRecord, ecM
var
seriesType
=
stageHandler
.
seriesType
;
var
seriesType
=
stageHandler
.
seriesType
;
var
getTargetSeries
=
stageHandler
.
getTargetSeries
;
var
getTargetSeries
=
stageHandler
.
getTargetSeries
;
var
overallProgress
=
true
;
var
overallProgress
=
true
;
var
isOverallFilter
=
stageHandler
.
isOverallFilter
;
var
modifyOutputEnd
=
stageHandler
.
modifyOutputEnd
;
// An overall task with seriesType detected or has `getTargetSeries`, we add
// An overall task with seriesType detected or has `getTargetSeries`, we add
// stub in each pipelines, it will set the overall task dirty when the pipeline
// stub in each pipelines, it will set the overall task dirty when the pipeline
...
@@ -382,7 +382,7 @@ function createOverallStageTask(scheduler, stageHandler, stageHandlerRecord, ecM
...
@@ -382,7 +382,7 @@ function createOverallStageTask(scheduler, stageHandler, stageHandlerRecord, ecM
stub
.
context
=
{
stub
.
context
=
{
model
:
seriesModel
,
model
:
seriesModel
,
overallProgress
:
overallProgress
,
overallProgress
:
overallProgress
,
isOverallFilter
:
isOverallFilter
modifyOutputEnd
:
modifyOutputEnd
};
};
stub
.
agent
=
overallTask
;
stub
.
agent
=
overallTask
;
stub
.
__block
=
overallProgress
;
stub
.
__block
=
overallProgress
;
...
...
src/stream/task.js
浏览文件 @
81fb75ed
...
@@ -73,8 +73,6 @@ taskProto.perform = function (performArgs) {
...
@@ -73,8 +73,6 @@ taskProto.perform = function (performArgs) {
if
(
__DEV__
)
{
if
(
__DEV__
)
{
assert
(
upTask
.
_outputDueEnd
!=
null
);
assert
(
upTask
.
_outputDueEnd
!=
null
);
}
}
// ??? FIXME move to schedueler?
// this._dueEnd = Math.max(upTask._outputDueEnd, this._dueEnd);
this
.
_dueEnd
=
upTask
.
_outputDueEnd
;
this
.
_dueEnd
=
upTask
.
_outputDueEnd
;
}
}
// DataTask or overallTask
// DataTask or overallTask
...
@@ -198,14 +196,12 @@ taskProto.getDownstream = function () {
...
@@ -198,14 +196,12 @@ taskProto.getDownstream = function () {
};
};
taskProto
.
setOutputEnd
=
function
(
end
)
{
taskProto
.
setOutputEnd
=
function
(
end
)
{
// ??? FIXME: check
// This only happend in dataTask, dataZoom, map, currently.
// This only happend in dataTask, dataZoom, map, currently.
// where dataZoom do not set end each time, but only set
// where dataZoom do not set end each time, but only set
// when reset. So we should record the setted end, in case
// when reset. So we should record the setted end, in case
// that the stub of dataZoom perform again and earse the
// that the stub of dataZoom perform again and earse the
// setted end by upstream.
// setted end by upstream.
this
.
_outputDueEnd
=
this
.
_settedOutputEnd
=
end
;
this
.
_outputDueEnd
=
this
.
_settedOutputEnd
=
end
;
// this._outputDueEnd = end;
};
};
...
...
test/line-large.html
0 → 100644
浏览文件 @
81fb75ed
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<script
src=
"lib/esl.js"
></script>
<script
src=
"lib/config.js"
></script>
<script
src=
"lib/jquery.min.js"
></script>
<script
src=
"lib/facePrint.js"
></script>
<script
src=
"lib/testHelper.js"
></script>
<link
rel=
"stylesheet"
href=
"lib/reset.css"
/>
</head>
<body>
<style>
.test-title
{
background
:
#146402
;
color
:
#fff
;
}
</style>
<div
id=
"main0"
></div>
<script>
var
chart
;
var
myChart
;
var
option
;
require
([
'
echarts
'
/*, 'map/js/china' */
],
function
(
echarts
)
{
var
count
=
1
e6
;
function
randomData
()
{
value
=
value
+
Math
.
random
()
*
21
-
10
;
return
[
xValue
+=
1
,
Math
.
round
(
value
)
];
}
var
data
=
[];
var
xValue
=
100
;
var
value
=
Math
.
random
()
*
1000
;
for
(
var
i
=
0
;
i
<
count
;
i
++
)
{
data
.
push
(
randomData
());
}
var
option
=
{
tooltip
:
{
trigger
:
'
axis
'
},
legend
:
{},
xAxis
:
{
},
yAxis
:
{
},
dataZoom
:
[{},
{
type
:
'
inside
'
}],
series
:
[{
name
:
'
large-line
'
,
type
:
'
line
'
,
showSymbol
:
false
,
sampling
:
'
max
'
,
data
:
data
}]
};
chart
=
myChart
=
testHelper
.
create
(
echarts
,
'
main0
'
,
{
option
:
option
});
});
</script>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录