feat(event): add option for step-before/step-after charts for tooltip to match step behavior #2332
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.
Issue
#2287
Details
Optionally makes tooltip show for point of moused over step for
step-after
andstep-before
charts.Fixes the previous inconsistencies when mousing between step transitions and fixes it for timeseries charts.
Added note to the documentation that
data․type
must bestep
, and updated the demo to reflect this.It's worth noting that prior to 5d3a5ed, this behavior was default for charts with
step-after
that weren't timeseries, but notstep-before
. I'm not sure what was intended, so I added it as an option with defaultfalse
to be safe, though I think it makes the step chart feel far more intuitive.step-before
example: https://i.imgur.com/mXywDti.pngstep-after
example: https://i.imgur.com/IBoR69K.pngstep-after
withtooltipMatch=false
(also current behavior): https://i.imgur.com/4B9rx2d.png