-
Notifications
You must be signed in to change notification settings - Fork 121
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(scales): bisect correctly on continuous scales #346
Conversation
This commit fix the wrong behaviour of the current invertWithStep implementation. It also fix the behaviour of cursor sync between charts with only lines and charts with only bars and empty intervals. fix elastic#227, fix elastic#221
Codecov Report
@@ Coverage Diff @@
## master #346 +/- ##
=========================================
- Coverage 98.34% 98.3% -0.05%
=========================================
Files 38 38
Lines 2726 2719 -7
Branches 646 642 -4
=========================================
- Hits 2681 2673 -8
Misses 42 42
- Partials 3 4 +1
Continue to review full report at Codecov.
|
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.
Yes it's visible on https://elastic.github.io/elastic-charts/?path=/story/mixed-charts--bar-and-lines if you hide the bar |
🎉 This PR is included in version 10.3.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [10.3.1](elastic/elastic-charts@v10.3.0...v10.3.1) (2019-08-26) ### Bug Fixes * **scales:** bisect correctly on continuous scales ([opensearch-project#346](elastic/elastic-charts#346)) ([0bb5b19](elastic/elastic-charts@0bb5b19)), closes [opensearch-project#227](elastic/elastic-charts#227) [opensearch-project#221](elastic/elastic-charts#221)
Summary
fix #227, fix #221, fix #347
This commit fix the wrong behaviour of the current invertWithStep implementation.
It also fix the behaviour of cursor sync between charts with only lines and charts with only bars and empty intervals.
It finally fix also the missing line/rect annotation that are dependent on ticks to be shown. The PR removed the dependency with the ticks and allows us to place correctly the annotations depending on chart type
Notes
I've the impression that we need an absolute refactoring of the current scale system for linear band scales. The current implementation is a bit hacky because it's a mix of a linear scale adapted to work as a band/ordinal scale.
Right now these two scales differs by 1 pixel, it's not noticeable but it create a bit of confusion on the code and testing.
The playground is updated with an example of multi-chart synched with various configurations
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.src/index.ts
(and stories only import from../src
except for test data & storybook)[ ] Proper documentation or storybook story was added for features that require explanation or tutorials