fix(line_annotation): use scaleAndValidate for line annotations#236
Merged
emmacunningham merged 3 commits intoelastic:masterfrom Jun 14, 2019
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #236 +/- ##
==========================================
- Coverage 97.75% 97.75% -0.01%
==========================================
Files 36 36
Lines 2630 2626 -4
Branches 588 587 -1
==========================================
- Hits 2571 2567 -4
Misses 52 52
Partials 7 7
Continue to review full report at Codecov.
|
32 tasks
markov00
pushed a commit
that referenced
this pull request
Jun 14, 2019
## [6.0.1](v6.0.0...v6.0.1) (2019-06-14) ### Bug Fixes * **line_annotation:** use scaleAndValidate for line annotations ([#236](#236)) ([48b180a](48b180a))
Collaborator
|
🎉 This PR is included in version 6.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
AMoo-Miki
pushed a commit
to AMoo-Miki/OpenSearch-Dashboards
that referenced
this pull request
Feb 10, 2022
## [6.0.1](elastic/elastic-charts@v6.0.0...v6.0.1) (2019-06-14) ### Bug Fixes * **line_annotation:** use scaleAndValidate for line annotations ([opensearch-project#236](elastic/elastic-charts#236)) ([1d57482](elastic/elastic-charts@1d57482))
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.
Summary
This PR introduces a fix for the issue where when we are in histogram mode, if a line annotation dataValue is outside of the xScale domain min & max, the line will not render. In the screenshot below, note that in regular bar series mode, the annotation line is drawn at 3.5, which in regular mode should not be visible as the xAxis ends at 3; however in histogram mode, we extend the domain by the minInterval, so the line should be visible at 3.5.
Implementation of this fix involved passing in the
enableHistogramModeto thecomputeXDomainLineAnnotationsfunction so that we could leverage thescaleAndValidateDatumfunction already used by RectAnnotations.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] Any consumer-facing exports were added tosrc/index.ts(and stories only import from../srcexcept for test data & storybook)