-
Notifications
You must be signed in to change notification settings - Fork 16
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(react-ui): Fix LegendProportion radius scale #877
Conversation
Pull Request Test Coverage Report for Build 9469631381Details
💛 - Coveralls |
1 similar comment
Pull Request Test Coverage Report for Build 9469631381Details
💛 - Coveralls |
Visit the preview URL for this PR (updated for commit 4916345): https://cartodb-fb-storybook-react-dev--pr877-donmccurdy-fix-l-5w4wmit6.web.app (expires Wed, 19 Jun 2024 14:32:35 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 517cc4d31d7e09cf277774e034094b67c301cd4c |
packages/react-ui/src/widgets/legend/legend-types/LegendProportion.js
Outdated
Show resolved
Hide resolved
Pull Request Test Coverage Report for Build 9469631381Details
💛 - 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.
lgtm
Pull Request Test Coverage Report for Build 9484450119Warning: 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 |
2 similar comments
Pull Request Test Coverage Report for Build 9484450119Warning: 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 |
Pull Request Test Coverage Report for Build 9484450119Warning: 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 |
Description
Shortcut: Story 415171, URL redacted.
LegendProportion displays the legend for point scaling, and sometimes calculates the scale incorrectly. In the image below, note that the 'max' is smaller than the second number, and the 'min' is larger than the third.
The cause is a typo, we should be using
max - min
instead ofmax + min
to calculate the interval over which the two middle steps are interpolated. With this bug, the steps were calculated correctly only whenmin
was zero.Additionally, the visual sizes of the circles in the legend panel are hard-coded to
[3, 6, 9, 12]
, representing two evenly-spaced steps between the min and max. However, our implementation would have generated different steps givenmin=3, max=12
as input, because it divided the interval by 4, not 3.Type of change
Acceptance
Please describe how to validate the feature or fix
Link C4R into Builder
Create a new map
Add SQL query
Set point layer to style radius by
lat
columnOpen legend, observe steps are correctly spaced