More zoomed-in box/violin hover labels fixes #3965
Merged
+38
−16
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.
@plotly/plotly_js This presents a few commits that alters (mostly fixes 😏 ) the box/violin hover behaviour when their corresponding value axis range is within the box/violin q1/q3 values. This PR is essentially generalises #3889
Consider,
Currently on master (ever since #3645, released in
v1.45.3
), hovering over the box gets us an exception on this lineplotly.js/src/components/fx/hover.js
Line 1187 in 0690162
as reported in #3962
Commit a4b771c is enough to fix the problem and matches the pre-
1.45.3
behaviour:but notice that
min
andq3
are shown andq1
andmax
are not, which looked odd to me.Commit 1634ec8 made
q1
andq3
show instead:which I think is better as we show both "innermost" values, but maybe we could do even better.
Commit ce5e5f9 made all box labels show i.e.
min
,q1
,median
,q3
andmax
while avoiding overlaps on the y-axis bounds:which I feel matches similar scenarios (e.g zoomed-in stack bars codepen) better, but please let me know if you disagree.