-
Notifications
You must be signed in to change notification settings - Fork 727
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 scale options in xychart #987
Conversation
Pull Request Test Coverage Report for Build 459497485
💛 - Coveralls |
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.
@Janpot thanks for the bug report and fix 🙏 ❤️
I encountered this myself before the holidays but didn't quite have time to submit a fix, this LGTM 🎉
xScale.domain(xScaleConfig.domain || xDomain); | ||
let xScale = createScale({ | ||
range: [xMin, xMax], | ||
domain: xDomain as [number, number], |
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.
I think depending on scale type this won't always be a number
, but I can try to fix the typing in a followup PR as types can be tricky to debug here.
Pull Request Test Coverage Report for Build 459497485Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
🐛 Bug Fix
Fixes scale options not applying in
XYChart
. See #986zero
,nice
,... options are applied increateScale
. they were overwritten by setting thedomain
andrange
afterwards. this PR makes sure thedomain
andrange
are set in thecreateScale
call directly so that other options are applied in the correct order.