Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/util/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1733,7 +1733,8 @@ export interface AriaLabelOption {
separator?: {
middle?: string;
end?: string;
}
},
excludeDataId?: number[]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename excludeDataId into excludeDimensionId. Thanks!

}
}

Expand Down
4 changes: 3 additions & 1 deletion src/visual/aria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 excludeDataId = labelModel.get(['data', 'excludeDataId']);
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 = !excludeDataId ? data.getValues(i)
: zrUtil.filter(data.getValues(i), (v, j) => zrUtil.indexOf(excludeDataId, j) === -1);
const dataLabel = labelModel.get(['data', name ? 'withName' : 'withoutName']);
dataLabels.push(
replace(dataLabel, {
Expand Down
97 changes: 97 additions & 0 deletions test/ut/spec/series/aria-columns-exclude.test.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.