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

Fix Treemap zoom when a group level is null #1676

Merged
merged 3 commits into from
Dec 16, 2021
Merged

Conversation

texodus
Copy link
Member

@texodus texodus commented Dec 15, 2021

When a Group by with null values was present in a parent group using the "Treemap" plugin, zooming in from that level and back out would fail to properly draw the original treemap. This occurred only when zooming, as the bug is not related to the initial SVG render itself, but the attribute-modifying zoom-in/zoom-out code that changes visibility/position of the treemap SVG elements. Here, group identity was checked using the column encoding "name1|name2" and .split("|"), which encodes [null] as an empty string and is indistinguishable from []. However, this string-encoding is only used a few times, and is generated from the correct Array representation only for treemaps, so this PR just replaces just it with this original Array and removes the string-decoding for the handful of usages.

This is related to #1628 and has the same behavior, except in a much narrower context e.g. only in the presence of null groups. This fix however is completely un-related to the fix in #1652.

@texodus texodus added bug Concrete, reproducible bugs and removed cla-present labels Dec 15, 2021
@texodus texodus merged commit 04ab687 into master Dec 16, 2021
@texodus texodus deleted the fix-treemap-null-groups branch December 16, 2021 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Concrete, reproducible bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant