You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2020/10/25 18:48:45 UTC
[incubator-echarts] branch next updated: fix: [stream] disable
block all series, brought by b7b941a6a.
This is an automated email from the ASF dual-hosted git repository.
sushuang pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/next by this push:
new aaa7d41 fix: [stream] disable block all series, brought by b7b941a6a.
aaa7d41 is described below
commit aaa7d41d3437d8f79e1b2c157633219cdc768ed2
Author: 100pah <su...@gmail.com>
AuthorDate: Mon Oct 26 02:26:50 2020 +0800
fix: [stream] disable block all series, brought by b7b941a6a.
---
src/stream/Scheduler.ts | 19 +++++++++++++------
src/util/types.ts | 2 +-
src/visual/style.ts | 2 +-
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/src/stream/Scheduler.ts b/src/stream/Scheduler.ts
index d808e1c..9dbc1f7 100644
--- a/src/stream/Scheduler.ts
+++ b/src/stream/Scheduler.ts
@@ -263,10 +263,12 @@ class Scheduler {
each(this._allHandlers, function (handler) {
const record = stageTaskMap.get(handler.uid) || stageTaskMap.set(handler.uid, {});
+ let errMsg = '';
if (__DEV__) {
// Currently do not need to support to sepecify them both.
- assert(!(handler.reset && handler.overallReset));
+ errMsg = '"reset" and "overallReset" must not be both specified.';
}
+ assert(!(handler.reset && handler.overallReset), errMsg);
handler.reset && this._createSeriesStageTask(handler, record, ecModel, api);
handler.overallReset && this._createOverallStageTask(handler, record, ecModel, api);
@@ -414,7 +416,8 @@ class Scheduler {
): void {
const scheduler = this;
const oldSeriesTaskMap = stageHandlerRecord.seriesTaskMap;
- // Totally stages are about several dozen, so probalby do not need to reuse the map.
+ // The count of stages are totally about only several dozen, so
+ // do not need to reuse the map.
const newSeriesTaskMap = stageHandlerRecord.seriesTaskMap = createHashMap();
const seriesType = stageHandler.seriesType;
const getTargetSeries = stageHandler.getTargetSeries;
@@ -479,7 +482,8 @@ class Scheduler {
};
const oldAgentStubMap = overallTask.agentStubMap;
- // Totally stages are about several dozen, so probalby do not need to reuse the map.
+ // The count of stages are totally about only several dozen, so
+ // do not need to reuse the map.
const newAgentStubMap = overallTask.agentStubMap = createHashMap<StubTask>();
const seriesType = stageHandler.seriesType;
@@ -493,10 +497,13 @@ class Scheduler {
// stub in each pipelines, it will set the overall task dirty when the pipeline
// progress. Moreover, to avoid call the overall task each frame (too frequent),
// we set the pipeline block.
- if (stageHandler.createOnAllSeries) {
- ecModel.eachRawSeries(createStub);
+ let errMsg = '';
+ if (__DEV__) {
+ errMsg = '"createOnAllSeries" do not supported for "overallReset", '
+ + 'becuase it will block all streams.';
}
- else if (seriesType) {
+ assert(!stageHandler.createOnAllSeries, errMsg);
+ if (seriesType) {
ecModel.eachRawSeriesByType(seriesType, createStub);
}
else if (getTargetSeries) {
diff --git a/src/util/types.ts b/src/util/types.ts
index 5879eee..d7a5e87 100644
--- a/src/util/types.ts
+++ b/src/util/types.ts
@@ -239,7 +239,7 @@ export interface StageHandlerOverallReset {
}
export interface StageHandler {
/**
- * Indicate that the task will be only piped all series
+ * Indicate that the task will be piped all series
* (`performRawSeries` indicate whether includes filtered series).
*/
createOnAllSeries?: boolean;
diff --git a/src/visual/style.ts b/src/visual/style.ts
index 7df2233..aaa866d 100644
--- a/src/visual/style.ts
+++ b/src/visual/style.ts
@@ -159,8 +159,8 @@ const dataStyleTask: StageHandler = {
};
// Pick color from palette for the data which has not been set with color yet.
+// Note: do not support stream rendering. No such cases yet.
const dataColorPaletteTask: StageHandler = {
- createOnAllSeries: true,
performRawSeries: true,
overallReset(ecModel) {
// Each type of series use one scope.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org