Skip to content
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: Handle rendering a single point #7256

Merged
merged 2 commits into from
Apr 9, 2019
Merged

Conversation

khtruong
Copy link
Contributor

@khtruong khtruong commented Apr 9, 2019

SUMMARY

Deck gl scales the x and y axis based on the bounds we pass it. The scaling involves dividing a target size by the range. But since the range is 0 for a single point, we throw an error if our data is a single coordinate. This change will check if we have a single coordinate. If so, then the bounds we pass to deck gl will be the point's coordinates with padding.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
Screen Shot 2019-04-09 at 2 53 45 PM

After:
Screen Shot 2019-04-09 at 2 48 45 PM

TEST PLAN

Manual testing and unit tests.

I tested manually with normal single points, boundary cases, and various viz types. I noticed that it does not render the single point for boundary cases and certain aggregated viz types like hexagon, But I believe this is more of a deck gl issue.

ADDITIONAL INFORMATION
[ ] Has associated issue:
[ ] Changes UI
[ ] Requires DB Migration. Confirm DB Migration upgrade and downgrade tested.
[ ] Introduces new feature or API
[ ] Removes existing feature or API
[x] Fixes bug
[ ] Refactors code
[ ] Adds test(s)
REVIEWERS

@xtinec @betodealmeida @datability-io
@williaster @kristw

Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT

@betodealmeida betodealmeida merged commit 2a67e8e into apache:lyftga Apr 9, 2019
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants