-
Notifications
You must be signed in to change notification settings - Fork 120
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
fix(tooltip): custom tooltip header context #1989
Merged
Merged
Conversation
This file contains 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
markov00
changed the title
fix(tooltip): custom tooltip heaader context
fix(tooltip): custom tooltip header context
Mar 7, 2023
So checking the code I think we should:
|
- change header from TooltipValue to PointerValue type - update tooltip header formatter type - return full set of values for customTooltips
nickofthyme
commented
Mar 21, 2023
markov00
reviewed
Mar 27, 2023
markov00
approved these changes
Mar 31, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks good to me, remember to mark this as breaking change
packages/charts/src/components/tooltip/components/tooltip_header.tsx
Outdated
Show resolved
Hide resolved
nickofthyme
pushed a commit
that referenced
this pull request
Apr 18, 2023
# [56.0.0](v55.0.0...v56.0.0) (2023-04-18) ### Bug Fixes * **deps:** update dependency @elastic/eui to ^76.4.0 ([#2008](#2008)) ([95176e1](95176e1)) * **deps:** update dependency @elastic/eui to v77 ([#2018](#2018)) ([c079730](c079730)) * **interactions:** brushing over origin coordinates ([#2013](#2013)) ([937feb0](937feb0)) * **tooltip:** custom tooltip header context ([#1989](#1989)) ([1e5b861](1e5b861)) ### Features * **metric:** trend with string value ([#2011](#2011)) ([91d7695](91d7695)) ### BREAKING CHANGES * **tooltip:** The `header` property of `TooltipInfo` type was simplified to `PointerValue` as to include only relevant properties. This change is propagated to all other types using `header` as a `TooltipValue`. The `TooltipInfo.values` used to conditionally pass only highlighted `TooltipValue`s when using a `customTooltip` and now _always_ passes all `values`.
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Summary
The
header
of theTooltipInfo
used to pull the tooltip value from the first/top value in the list of tooltip values. This behavior was unorthodox and unreliable. We have changed theTooltipInfo
type to better represent theheader
andvalues
.BREAKING CHANGES: The
header
property ofTooltipInfo
type was simplified toPointerValue
as to include only relevant properties. This change is propagated to all other types usingheader
as aTooltipValue
. TheTooltipInfo.values
used to conditionally pass only highlightedTooltipValue
s when using acustomTooltip
and now always passes allvalues
.Issues
fixes #1988
Checklist
:xy
,:partition
):interactions
,:axis
):theme
label has been added and the@elastic/eui-design
team has been pinged when there areTheme
API changescloses #123
,fixes #123
)packages/charts/src/index.ts