Ovilia commented on code in PR #19232:
URL: https://github.com/apache/echarts/pull/19232#discussion_r1386131792


##########
src/component/axis/parallelAxisAction.ts:
##########
@@ -25,14 +25,20 @@ import ParallelModel from 
'../../coord/parallel/ParallelModel';
 import { EChartsExtensionInstallRegisters } from '../../extension';
 
 interface ParallelAxisAreaSelectPayload extends Payload {
-    parallelAxisId: string;
-    intervals: ParallelAxisInterval[]
+    parallelAxisId?: string;
+    intervals?: ParallelAxisInterval[];
+    axes?: string[]
 }
 
 const actionInfo = {
     type: 'axisAreaSelect',
-    event: 'axisAreaSelected'
-    // update: 'updateVisual'
+    event: 'axisAreaSelected',
+    update: 'updateVisual'

Review Comment:
   Can you explain why `update: 'updateVisual'` should be uncommented? I don't 
know why it's originally commented.



##########
src/component/axis/parallelAxisAction.ts:
##########
@@ -62,5 +68,29 @@ export function installParallelActions(registers: 
EChartsExtensionInstallRegiste
         );
     });
 
+    /**
+     * Register the clear action
+     */
+    registers.registerAction(clearActionInfo, function (payload: 
ParallelAxisAreaSelectPayload, ecModel: GlobalModel) {
+        if (payload.axes && payload.axes.length) {

Review Comment:
   Checking `if (payload.axes)` should be enough.



##########
src/component/axis/parallelAxisAction.ts:
##########
@@ -62,5 +68,29 @@ export function installParallelActions(registers: 
EChartsExtensionInstallRegiste
         );
     });
 
+    /**
+     * Register the clear action
+     */
+    registers.registerAction(clearActionInfo, function (payload: 
ParallelAxisAreaSelectPayload, ecModel: GlobalModel) {
+        if (payload.axes && payload.axes.length) {
+            // clear specific axes/axis by name
+            payload.axes.forEach(axisName => {

Review Comment:
   Please use the `forEach` in `zrUtil` to make it compatible for more devices.



##########
src/component/axis/parallelAxisAction.ts:
##########
@@ -25,14 +25,20 @@ import ParallelModel from 
'../../coord/parallel/ParallelModel';
 import { EChartsExtensionInstallRegisters } from '../../extension';
 
 interface ParallelAxisAreaSelectPayload extends Payload {
-    parallelAxisId: string;
-    intervals: ParallelAxisInterval[]
+    parallelAxisId?: string;
+    intervals?: ParallelAxisInterval[];
+    axes?: string[]

Review Comment:
   If this is axisName of every axis, it should be named to be `axisNames`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to