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


##########
src/visual/aria.ts:
##########
@@ -218,11 +218,13 @@ export default function ariaVisual(ecModel: GlobalModel, 
api: ExtensionAPI) {
 
                     const middleSeparator = labelModel.get(['data', 
'separator', 'middle']);
                     const endSeparator = labelModel.get(['data', 'separator', 
'end']);
+                    const columnsToExclude = labelModel.get(['data', 
'columnsToExclude']);
                     const dataLabels = [];
                     for (let i = 0; i < data.count(); i++) {
                         if (i < maxDataCnt) {
                             const name = data.getName(i);
-                            const value = data.getValues(i);
+                            const value = !columnsToExclude ? data.getValues(i)
+                                : data.getValues(i).filter((value, j) => 
!columnsToExclude?.includes(j));

Review Comment:
   Use `zrUtil.filter` and `zrUtil.indexOf` instead.



##########
src/util/types.ts:
##########
@@ -1733,7 +1733,8 @@ export interface AriaLabelOption {
         separator?: {
             middle?: string;
             end?: string;
-        }
+        },
+        columnsToExclude?: number[]

Review Comment:
   I see other places in the code use `excludeSeriesId`, so perhaps here we 
should use `excludeDataId` instead.



-- 
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