Return actual data values (rather than calcdata values) for xvals / yvals in hoveranywhere and clickanywhere events - #7964
Open
emilykl wants to merge 3 commits into
Open
Return actual data values (rather than calcdata values) for xvals / yvals in hoveranywhere and clickanywhere events#7964emilykl wants to merge 3 commits into
xvals / yvals in hoveranywhere and clickanywhere events#7964emilykl wants to merge 3 commits into
Conversation
xvals / yvals in hoveranywhere and clickanywhere events
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.
Closes #7816
Modify hoverdata and clickdata such that the
xvals/yvalsproperties always contain data values (in the same form as the input data, i.e. may be strings in some cases) rather thancalcdatavalues (which are always numeric).Result:
linearandlog) this change has (essentially) no effect.c2d, but it's basically just checking that the values are numeric, and returningundefinedif notxvals/yvalsnow contain date strings rather than numbers representing milliseconds. (This addresses the bug reported in [BUG]: hoveranywhere / clickanywhere return incorrect timestamps for date axes with local time zones #7816)xvals/yvalsnow contain strings corresponding to category names rather than numeric values.The attribute descriptions for
hoveranywhere/clickanywhererefer toxvalsandyvalsbeing "in data space", so I believe this was always the intended behavior.Steps for testing
Details
npm ci && npm run buildxvalscontains date strings andyvalscontains a string matching a category (correct behavior)v4.0and runnpm ci && npm run buildxvalsandyvalsare now both numeric (incorrect behavior)