Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deduplicate channels #332

Merged
merged 1 commit into from
May 24, 2023
Merged

deduplicate channels #332

merged 1 commit into from
May 24, 2023

Conversation

vijithassar
Copy link
Owner

@vijithassar vijithassar commented May 24, 2023

It's possible to reuse channels for redundant encodings, such as a bar chart where every bar is a different color because color and bar position are reading from the same data field. When that is expressed via text as with a tooltip or a table or the aria-label attribute, however, the redundant visual mapping becomes redundant text. Cleaning this up requires deduplicating the channels by making sure the associated fields are never repeated.

When a field is reused for multiple redundant encodings, make sure it's only listed once in the tooltips and descriptions.
@vijithassar
Copy link
Owner Author

This implementation uses ES6 object key iteration order, such that earlier channels are preserved and later channels are omitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant