-
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
feat(domain): scale data to a specific domain via axis spec #98
feat(domain): scale data to a specific domain via axis spec #98
Conversation
Codecov Report
@@ Coverage Diff @@
## master #98 +/- ##
==========================================
+ Coverage 88.63% 88.86% +0.22%
==========================================
Files 28 28
Lines 1144 1167 +23
Branches 118 119 +1
==========================================
+ Hits 1014 1037 +23
+ Misses 120 119 -1
- Partials 10 11 +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.
Code LGTM, tested locally.
I've left few minor comments on code.
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.
Changes after review LGTM.
# [3.2.0](v3.1.1...v3.2.0) (2019-03-19) ### Features * **domain:** scale data to a specific domain via axis spec ([#98](#98)) ([b039ebf](b039ebf))
🎉 This PR is included in version 3.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [3.2.0](elastic/elastic-charts@v3.1.1...v3.2.0) (2019-03-19) ### Features * **domain:** scale data to a specific domain via axis spec ([opensearch-project#98](elastic/elastic-charts#98)) ([4857e42](elastic/elastic-charts@4857e42))
Summary
close #86
This PR introduces the feature to specify custom domains for a series. There are two types of domains to customize: xDomain and yDomains.
xDomain
xDomain is configured via the
Settings
spec because the xDomain is shared globally and so the user should only be able to configure one xDomain.yDomains
yDomains are configured per axis/group.
If a domain is supplied for an axis that is an xDomain axis, an error will be thrown, letting the user know that this should be added through the Settings spec.
If a user specifies multiple domains for the same group (which can be done when having multiple axes), then the domains are merged to cover the largest range of the supplied domains (e.g. if
{ min: 0, max: 5 }
and{ min: 1, max: 15 }
are provided as the domains for the same group, then the merged domain applied would be{ min : 0, max: 15 }
)Also, to allow the user to specify a custom domain but not show the axis, we implement the
hide
feature.Custom domain w/ hidden axis:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.