Repository navigation
Conversation
Co-authored-by: generaltony007 <144252170+GeneralTony007@users.noreply.github.com>
Co-authored-by: generaltony007 <144252170+GeneralTony007@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
toggleDataVisibility(index)should hide a bar, but_calculateBarValuePixels()appliesminBarLengthafter collapsing its head to its base. The minimum length makes the hidden bar visible again. For example, hiding a0.01value withminBarLength: 45leaves a roughly 45px bar on the canvas.Change
Read the item's visibility once and only apply the minimum-length adjustment to visible items. Hidden bars retain their collapsed geometry; visible zero, small, negative and floating bars keep their minimum lengths. This does not change dataset visibility, stacking order, per-bar base resolution or border selection.
Tests
Added 40 cases covering both index axes, reversed value scales, stacked and unstacked charts, zero/small positive/small negative/floating values, repeated updates and hide/show restoration. Cross-dataset controls check that other bars stay in place, including charts without a minimum length. Hidden canvas pixels are checked too.
On unmodified master, 36 new cases fail and 4 controls pass. With this change, a fresh frozen-lockfile install passes all 1743 native Karma/Chromium cases, the production build, declaration generation and
tsc --noEmit. Scoped ESLint has no errors and five existing warning locations; the already-warned value-pixel method gains one statement and one complexity point. Firefox and downstream integration tests were not run locally.The original bar visibility support is #7870. Minimum-length behavior from #9400, #10157 and #10766 is retained for visible bars.