-
Notifications
You must be signed in to change notification settings - Fork 33
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
add default upper and lower x/y bounds if single data point #237
Conversation
🦋 Changeset detectedLatest commit: 0f0bd87 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
LGTM! Aside from the small comments
But I'm not 100% this is exactly what we want to do, have you tried using a |
…midableLabs/victory-native-xl into bug/single-data-point-dupe-key-error
@zibs yep. I played around with using a Essentially, I figured my options were:
|
Dang! Yep okay, maybe this is the best option then! @keithluchtel Feel free to take a look if you want! |
Description
Fixes issue #207
The problem here is we do not enforce at least 2 distinct data points, so whenever a user adds a data array with a single data point (or an array with multiple identical data points), we'd throw a duplicate key warning and the chart UI would break.
This fix simply checks the following: if the min and max bounds are the same, then manually append an upper and lower bound.
Type of Change
How Has This Been Tested?
Checklist: (Feel free to delete this section upon completion)
yarn run check:code
and all checks pass