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

[HeatmapVis] Fix min axis array length off by 1 in error message #1521

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

axelboc
Copy link
Contributor

@axelboc axelboc commented Oct 31, 2023

When the size of an axis dataset doesn't match the size of the dimension to which it is mapped (via the NX axes attribute), the error message was so far reporting an incorrect value, off by 1:

image

This was due to HeatmapVis calling getPixelEdgeValues, which in turn was calling getAxisValues(rawValues, pixelCount + 1); to account for the fact that the axis values need to include the value of the outside edge of the last pixel.

I didn't try to be smart: I stopped calling getAxisValues from getPixelEdgeValues and instead duplicated/tweaked the logic appropriately. Since getAxisValues is now only used by LineVis, I moved it and its hook into dedicated files.

image

@axelboc axelboc requested a review from loichuder October 31, 2023 14:29
@axelboc axelboc merged commit 04a0f75 into main Oct 31, 2023
8 checks passed
@axelboc axelboc deleted the fix-min-length-error branch October 31, 2023 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants