You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2020/12/28 05:44:42 UTC

[incubator-echarts] branch treeshakable-exports updated (e26e4f2 -> 6e38bc5)

This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a change to branch treeshakable-exports
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git.


    from e26e4f2  merge change from the master
     new db48b20  fix: fix parallel action not work bug
     new 6e38bc5  add todo mark comments

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/chart/treemap/treemapAction.ts               |  2 -
 src/component/axis/AngleAxisView.ts              |  1 -
 src/component/axis/ParallelAxisView.ts           |  1 -
 src/component/axis/parallelAxisAction.ts         | 48 +++++++++++++-----------
 src/component/brush/visualEncoding.ts            |  1 -
 src/component/helper/BrushController.ts          |  2 -
 src/component/helper/interactionMutex.ts         |  2 +-
 src/component/parallel/install.ts                |  3 ++
 src/component/toolbox/feature/DataView.ts        |  2 +
 src/component/toolbox/feature/MagicType.ts       |  1 +
 src/component/toolbox/feature/Restore.ts         |  1 +
 src/coord/cartesian/defaultAxisExtentFromData.ts |  1 +
 src/coord/geo/geoCreator.ts                      |  2 -
 src/export/all.ts                                |  1 -
 14 files changed, 35 insertions(+), 33 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 02/02: add todo mark comments

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a commit to branch treeshakable-exports
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit 6e38bc5bcc651b4b463a0b4be287ce8a9d15d664
Author: pissang <bm...@gmail.com>
AuthorDate: Mon Dec 28 13:44:04 2020 +0800

    add todo mark comments
---
 src/component/helper/interactionMutex.ts         | 2 +-
 src/component/toolbox/feature/DataView.ts        | 2 ++
 src/component/toolbox/feature/MagicType.ts       | 1 +
 src/component/toolbox/feature/Restore.ts         | 1 +
 src/coord/cartesian/defaultAxisExtentFromData.ts | 1 +
 src/export/all.ts                                | 1 -
 6 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/component/helper/interactionMutex.ts b/src/component/helper/interactionMutex.ts
index 686475f..04e1f42 100644
--- a/src/component/helper/interactionMutex.ts
+++ b/src/component/helper/interactionMutex.ts
@@ -18,7 +18,6 @@
 */
 
 // @ts-nocheck
-
 import * as echarts from '../../echarts';
 
 const ATTR = '\0_ec_interaction_mutex';
@@ -52,6 +51,7 @@ function getStore(zr) {
  *         If no userKey, release global cursor.
  * }
  */
+// TODO: SELF REGISTERED.
 echarts.registerAction(
     {type: 'takeGlobalCursor', event: 'globalCursorTaken', update: 'update'},
     function () {}
diff --git a/src/component/toolbox/feature/DataView.ts b/src/component/toolbox/feature/DataView.ts
index 1b6de33..9370ddd 100644
--- a/src/component/toolbox/feature/DataView.ts
+++ b/src/component/toolbox/feature/DataView.ts
@@ -487,6 +487,8 @@ function tryMergeDataOption(newData: DataList, originalData: DataList) {
     });
 }
 
+
+// TODO: SELF REGISTERED.
 echarts.registerAction({
     type: 'changeDataView',
     event: 'dataViewChanged',
diff --git a/src/component/toolbox/feature/MagicType.ts b/src/component/toolbox/feature/MagicType.ts
index 4f58796..edc0b9a 100644
--- a/src/component/toolbox/feature/MagicType.ts
+++ b/src/component/toolbox/feature/MagicType.ts
@@ -231,6 +231,7 @@ const seriesOptGenreator: Record<IconType, SeriesOptGenreator> = {
 };
 
 
+// TODO: SELF REGISTERED.
 echarts.registerAction({
     type: 'changeMagicType',
     event: 'magicTypeChanged',
diff --git a/src/component/toolbox/feature/Restore.ts b/src/component/toolbox/feature/Restore.ts
index b22603b..dd9e8a5 100644
--- a/src/component/toolbox/feature/Restore.ts
+++ b/src/component/toolbox/feature/Restore.ts
@@ -51,6 +51,7 @@ class RestoreOption extends ToolboxFeature<ToolboxRestoreFeatureOption> {
     }
 }
 
+// TODO: SELF REGISTERED.
 echarts.registerAction(
     {type: 'restore', event: 'restore', update: 'prepareAndUpdate'},
     function (payload, ecModel) {
diff --git a/src/coord/cartesian/defaultAxisExtentFromData.ts b/src/coord/cartesian/defaultAxisExtentFromData.ts
index b82391b..cd494c3 100644
--- a/src/coord/cartesian/defaultAxisExtentFromData.ts
+++ b/src/coord/cartesian/defaultAxisExtentFromData.ts
@@ -44,6 +44,7 @@ type SeriesRecord = {
 
 // A tricky: the priority is just after dataZoom processor.
 // If dataZoom has fixed the min/max, this processor do not need to work.
+// TODO: SELF REGISTERED.
 echarts.registerProcessor(echarts.PRIORITY.PROCESSOR.FILTER + 10, {
 
     getTargetSeries: function (ecModel) {
diff --git a/src/export/all.ts b/src/export/all.ts
index 678c5d5..41b7420 100644
--- a/src/export/all.ts
+++ b/src/export/all.ts
@@ -18,7 +18,6 @@
 */
 
 // This file is for providing types when import whole module.
-// import * as echarts from 'echarts'
 
 export * from './core';
 export * from './option';
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 01/02: fix: fix parallel action not work bug

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shenyi pushed a commit to branch treeshakable-exports
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit db48b20a5a6ec78e467497d4710991d282a7efc8
Author: pissang <bm...@gmail.com>
AuthorDate: Mon Dec 28 13:39:19 2020 +0800

    fix: fix parallel action not work bug
---
 src/chart/treemap/treemapAction.ts       |  2 --
 src/component/axis/AngleAxisView.ts      |  1 -
 src/component/axis/ParallelAxisView.ts   |  1 -
 src/component/axis/parallelAxisAction.ts | 48 +++++++++++++++++---------------
 src/component/brush/visualEncoding.ts    |  1 -
 src/component/helper/BrushController.ts  |  2 --
 src/component/parallel/install.ts        |  3 ++
 src/coord/geo/geoCreator.ts              |  2 --
 8 files changed, 29 insertions(+), 31 deletions(-)

diff --git a/src/chart/treemap/treemapAction.ts b/src/chart/treemap/treemapAction.ts
index 3c3ff87..8577e48 100644
--- a/src/chart/treemap/treemapAction.ts
+++ b/src/chart/treemap/treemapAction.ts
@@ -17,8 +17,6 @@
 * under the License.
 */
 
-
-import * as echarts from '../../echarts';
 import * as helper from '../helper/treeHelper';
 import { Payload } from '../../util/types';
 import TreemapSeriesModel from './TreemapSeries';
diff --git a/src/component/axis/AngleAxisView.ts b/src/component/axis/AngleAxisView.ts
index cb15930..1910def 100644
--- a/src/component/axis/AngleAxisView.ts
+++ b/src/component/axis/AngleAxisView.ts
@@ -26,7 +26,6 @@ import AxisBuilder from './AxisBuilder';
 import { AngleAxisModel } from '../../coord/polar/AxisModel';
 import GlobalModel from '../../model/Global';
 import Polar from '../../coord/polar/Polar';
-import ComponentView from '../../view/Component';
 import AngleAxis from '../../coord/polar/AngleAxis';
 import { ZRTextAlign, ZRTextVerticalAlign, ColorString } from '../../util/types';
 import { getECData } from '../../util/innerStore';
diff --git a/src/component/axis/ParallelAxisView.ts b/src/component/axis/ParallelAxisView.ts
index 50291aa..efc741d 100644
--- a/src/component/axis/ParallelAxisView.ts
+++ b/src/component/axis/ParallelAxisView.ts
@@ -18,7 +18,6 @@
 */
 
 
-// import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import AxisBuilder from './AxisBuilder';
 import BrushController, {
diff --git a/src/component/axis/parallelAxisAction.ts b/src/component/axis/parallelAxisAction.ts
index 38b1ced..f1e0087 100644
--- a/src/component/axis/parallelAxisAction.ts
+++ b/src/component/axis/parallelAxisAction.ts
@@ -18,11 +18,11 @@
 */
 
 
-import * as echarts from '../../echarts';
 import { Payload } from '../../util/types';
 import ParallelAxisModel, { ParallelAxisInterval } from '../../coord/parallel/AxisModel';
 import GlobalModel from '../../model/Global';
 import ParallelModel from '../../coord/parallel/ParallelModel';
+import { EChartsExtensionInstallRegisters } from '../../extension';
 
 interface ParallelAxisAreaSelectPayload extends Payload {
     parallelAxisId: string;
@@ -35,28 +35,32 @@ const actionInfo = {
     // update: 'updateVisual'
 };
 
-echarts.registerAction(actionInfo, function (payload: ParallelAxisAreaSelectPayload, ecModel: GlobalModel) {
-    ecModel.eachComponent(
-        {mainType: 'parallelAxis', query: payload},
-        function (parallelAxisModel: ParallelAxisModel) {
-            parallelAxisModel.axis.model.setActiveIntervals(payload.intervals);
-        }
-    );
-});
-
 export interface ParallelAxisExpandPayload extends Payload {
     axisExpandWindow?: number[];
 }
 
-/**
- * @payload
- */
-echarts.registerAction('parallelAxisExpand', function (payload: ParallelAxisExpandPayload, ecModel) {
-    ecModel.eachComponent(
-        {mainType: 'parallel', query: payload},
-        function (parallelModel: ParallelModel) {
-            parallelModel.setAxisExpand(payload);
-        }
-    );
-
-});
\ No newline at end of file
+export function installParallelActions(registers: EChartsExtensionInstallRegisters) {
+
+    registers.registerAction(actionInfo, function (payload: ParallelAxisAreaSelectPayload, ecModel: GlobalModel) {
+        ecModel.eachComponent(
+            {mainType: 'parallelAxis', query: payload},
+            function (parallelAxisModel: ParallelAxisModel) {
+                parallelAxisModel.axis.model.setActiveIntervals(payload.intervals);
+            }
+        );
+    });
+
+    /**
+     * @payload
+     */
+    registers.registerAction('parallelAxisExpand', function (payload: ParallelAxisExpandPayload, ecModel) {
+        ecModel.eachComponent(
+            {mainType: 'parallel', query: payload},
+            function (parallelModel: ParallelModel) {
+                parallelModel.setAxisExpand(payload);
+            }
+        );
+    });
+
+
+}
\ No newline at end of file
diff --git a/src/component/brush/visualEncoding.ts b/src/component/brush/visualEncoding.ts
index 9c881c4..9a607fc 100644
--- a/src/component/brush/visualEncoding.ts
+++ b/src/component/brush/visualEncoding.ts
@@ -18,7 +18,6 @@
 */
 
 
-import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import BoundingRect from 'zrender/src/core/BoundingRect';
 import * as visualSolution from '../../visual/visualSolution';
diff --git a/src/component/helper/BrushController.ts b/src/component/helper/BrushController.ts
index 1b24bef..9320ece 100644
--- a/src/component/helper/BrushController.ts
+++ b/src/component/helper/BrushController.ts
@@ -117,8 +117,6 @@ export interface BrushPanelConfig {
 // `true` represents global panel;
 type BrushPanelConfigOrGlobal = BrushPanelConfig | typeof BRUSH_PANEL_GLOBAL;
 
-interface BrushPanelElement extends graphic.Group {
-}
 
 interface BrushCover extends graphic.Group {
     __brushOption: BrushCoverConfig;
diff --git a/src/component/parallel/install.ts b/src/component/parallel/install.ts
index 7561f2f..3f3577b 100644
--- a/src/component/parallel/install.ts
+++ b/src/component/parallel/install.ts
@@ -26,6 +26,7 @@ import parallelCoordSysCreator from '../../coord/parallel/parallelCreator';
 import axisModelCreator from '../../coord/axisModelCreator';
 import ParallelAxisModel, {ParallelAxisOption} from '../../coord/parallel/AxisModel';
 import ParallelAxisView from '../axis/ParallelAxisView';
+import { installParallelActions } from '../axis/parallelAxisAction';
 
 const defaultAxisOption: ParallelAxisOption = {
     type: 'value',
@@ -53,4 +54,6 @@ export function install(registers: EChartsExtensionInstallRegisters) {
     axisModelCreator<ParallelAxisOption, typeof ParallelAxisModel>(
         registers, 'parallel', ParallelAxisModel, defaultAxisOption
     );
+
+    installParallelActions(registers);
 }
\ No newline at end of file
diff --git a/src/coord/geo/geoCreator.ts b/src/coord/geo/geoCreator.ts
index b6e2f47..b88ef99 100644
--- a/src/coord/geo/geoCreator.ts
+++ b/src/coord/geo/geoCreator.ts
@@ -17,8 +17,6 @@
 * under the License.
 */
 
-
-import * as echarts from '../../echarts';
 import * as zrUtil from 'zrender/src/core/util';
 import Geo from './Geo';
 import * as layout from '../../util/layout';


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org