Conversation
eldeal
reviewed
Mar 24, 2023
src/plotly/chartDefinition.ts
Outdated
| } | ||
|
|
||
| // if interactivity is enabled show hover text over chart | ||
| if (chartProps.Interactivity.interactivity === "x+y") { |
There was a problem hiding this comment.
Should the "x+y" be a const somewhere, for a certain interactivity type?
Contributor
Author
There was a problem hiding this comment.
I've changed it to a const, but I've swapped it over to not equal "none", just in case in the future we wanted to introduce other interactivity modes.
Examples being "x", "y", "x+y", "x+y+z", "all".
https://plotly.com/javascript/reference/scatter/#scatter-hoverinfo
eldeal
reviewed
Mar 24, 2023
eldeal
left a comment
There was a problem hiding this comment.
Just the one little question, but looks reasonable for fixing each of the explained problems
eldeal
approved these changes
Mar 28, 2023
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.
This ticket is to address multiple issues with the tooltip on charts.
For testing I used this csv. With PFA, value and sex in the data columns.
First being a rounding issue where anything over 1k would be rounded down and only show a couple digits.

Narrowed the issue down to just stacked bar charts and how the float for total was being parsed.
Second was when setting series tooltip to 'none' the tooltip would still appear. This was due to 'hovertemplate' overriding 'hoverinfo' , 'hovertemplate' is not only conditionally set.
Third was 'Hoverinfo unit' despite being set not appearing on the tooltip popup. 'hoverInfoUnit' is now pulled into the hover template.
