Skip to content
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(crosshair): hide horizontal line when the pointer is outside chart #484

Merged

Conversation

markov00
Copy link
Member

@markov00 markov00 commented Dec 5, 2019

Summary

This commit fix the visibility of the crosshair horizontal line, hiding
it when the pointer projected position is outside the chart area.

fix #483

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

  • ~[ ] Any consumer-facing exports were added to src/index.ts (and stories only import from ../src except for test data & storybook)!
  • [ ] This was checked for cross-browser compatibility, including a check against IE11
  • [ ] Proper documentation or storybook story was added for features that require explanation or tutorials
  • Unit tests were updated or added to match the most common scenarios
  • Each commit follows the convention

This commit fix the visibility of the crosshair horizontal line, hiding
it when the pointer projected position is outside the chart area.

fix elastic#483
@markov00 markov00 added bug Something isn't working regression labels Dec 5, 2019
@markov00 markov00 requested a review from rshen91 December 5, 2019 11:53
@codecov-io
Copy link

codecov-io commented Dec 5, 2019

Codecov Report

Merging #484 into master will decrease coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #484      +/-   ##
=========================================
- Coverage   83.77%   83.7%   -0.08%     
=========================================
  Files         158     169      +11     
  Lines        4703    4853     +150     
  Branches      952     966      +14     
=========================================
+ Hits         3940    4062     +122     
- Misses        748     775      +27     
- Partials       15      16       +1
Impacted Files Coverage Δ
..._types/xy_chart/state/selectors/get_cursor_line.ts 100% <ø> (ø) ⬆️
...rc/chart_types/xy_chart/renderer/dom/crosshair.tsx 80.85% <ø> (-2.13%) ⬇️
.../chart_types/xy_chart/crosshair/crosshair_utils.ts 93.4% <100%> (+0.22%) ⬆️
src/mocks/series/series.ts 81.96% <0%> (ø)
src/mocks/specs/specs.ts 66.66% <0%> (ø)
src/mocks/scale/index.ts 100% <0%> (ø)
src/mocks/index.ts 100% <0%> (ø)
src/mocks/series/index.ts 100% <0%> (ø)
src/mocks/series/seriesIdentifiers.ts 93.33% <0%> (ø)
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 20ade8e...7a7ca09. Read the comment docs.

@markov00 markov00 requested a review from nickofthyme December 5, 2019 15:25
Copy link
Collaborator

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@markov00 markov00 merged commit 654d929 into elastic:master Dec 5, 2019
@markov00 markov00 deleted the 2019-12-05_fix_crosshair_line_visibility branch December 5, 2019 17:57
markov00 pushed a commit that referenced this pull request Dec 5, 2019
## [15.0.2](v15.0.1...v15.0.2) (2019-12-05)

### Bug Fixes

* **crosshair:** hide horizontal line when the pointer is outside chart ([#484](#484)) ([654d929](654d929)), closes [#483](#483)
@markov00
Copy link
Member Author

markov00 commented Dec 5, 2019

🎉 This PR is included in version 15.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@markov00 markov00 added the released Issue released publicly label Dec 5, 2019
AMoo-Miki pushed a commit to AMoo-Miki/OpenSearch-Dashboards that referenced this pull request Feb 10, 2022
## [15.0.2](elastic/elastic-charts@v15.0.1...v15.0.2) (2019-12-05)

### Bug Fixes

* **crosshair:** hide horizontal line when the pointer is outside chart ([opensearch-project#484](elastic/elastic-charts#484)) ([bb52d35](elastic/elastic-charts@bb52d35)), closes [opensearch-project#483](elastic/elastic-charts#483)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crosshair line visible when pointer is outside chart
3 participants