-
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(histogram): fix annotation and tooltip overflow with single value #343
fix(histogram): fix annotation and tooltip overflow with single value #343
Conversation
This commit fix an issue where a rect annotation with x0 defined in a single value histogram, is drawn outisde of the chart. BREAKING CHANGE: The current coordinate configuration of a rect annotation were inverted. This commit now reverse them: a rect coordinate with only the x0 value will cover from the x0 value to the end of the domain, a rect coordinate with only the x1 value will cover the interval from the beginning of the domain till the x1 value.
Codecov Report
@@ Coverage Diff @@
## master #343 +/- ##
==========================================
- Coverage 98.34% 98.31% -0.04%
==========================================
Files 38 38
Lines 2726 2736 +10
Branches 646 647 +1
==========================================
+ Hits 2681 2690 +9
- Misses 42 43 +1
Partials 3 3
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.
Tested locally, LGTM.
Ya both seem to be inverted. I think swapping y0
and y1
would be good to stay consistent.
# [11.0.0](v10.3.1...v11.0.0) (2019-08-26) ### Bug Fixes * **histogram:** fix overflowing annotation with single value ([#343](#343)) ([2268f04](2268f04)), closes [#342](#342) [#341](#341) ### BREAKING CHANGES * **histogram:** The current coordinate configuration of a rect annotation were inverted. This commit now reverse them: a rect coordinate with only the x0 value will cover from the x0 value to the end of the domain, a rect coordinate with only the x1 value will cover the interval from the beginning of the domain till the x1 value.
🎉 This PR is included in version 11.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [11.0.0](elastic/elastic-charts@v10.3.1...v11.0.0) (2019-08-26) ### Bug Fixes * **histogram:** fix overflowing annotation with single value ([opensearch-project#343](elastic/elastic-charts#343)) ([7dc097e](elastic/elastic-charts@7dc097e)), closes [opensearch-project#342](elastic/elastic-charts#342) [opensearch-project#341](elastic/elastic-charts#341) ### BREAKING CHANGES * **histogram:** The current coordinate configuration of a rect annotation were inverted. This commit now reverse them: a rect coordinate with only the x0 value will cover from the x0 value to the end of the domain, a rect coordinate with only the x1 value will cover the interval from the beginning of the domain till the x1 value.
Summary
fix #342, fix #341
This commit fix an issue where a rect annotation with x0 defined in a single value histogram, is
drawn outside the chart as shown in #341.
It also fix the tooltip rendering inside the chart: #342
before
after
BREAKING CHANGE
The current coordinate configuration of a rect annotation seems inverted. From the rect annotation PR: #180 I'm proposing to invert the x0 and x1 meaning on the annotation coordinate.
With
x0
I always think of the left hand side of a rectangle, and withx1
the right hand side.So with that in mind I'd like to change that with
@nickofthyme do you think we should to the same also for the y0 and y1 values?
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)