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 issues with the display of the continuous/gradient legend in the Cesium map #2049

Closed
3 tasks done
robyngit opened this issue Aug 23, 2022 · 1 comment
Closed
3 tasks done
Assignees
Labels
bug cesium pdg Permafrost Discovery Gateway portals Anything related to portals
Milestone

Comments

@robyngit
Copy link
Member

robyngit commented Aug 23, 2022

The new PDG Webb dataset comprises data that: 1) ranges from a negative number to a positive number; and 2) has a very small range (<0.01). Both of these features have highlighted some bugs in the continuous mini-legend displayed in the Cesium map:

  • The gradient doesn't cover the full range of colours when the min value in the legend is < 0
  • The tooltip that shows the value at a particular colour on mouseover doesn't display if that value is 0
  • Numbers are rounded for display, but very small numbers are always rounded to zero (the number of decimal places we allow needs to be flexible depending on the data).

Here is how the Webb dataset looks currently (this is with mouseover):
Screen Shot 2022-08-23 at 16 33 52

Here is how we expect it to look:
Screen Shot 2022-08-23 at 16 32 15

@robyngit robyngit added bug portals Anything related to portals pdg Permafrost Discovery Gateway cesium labels Aug 23, 2022
@robyngit robyngit self-assigned this Aug 23, 2022
@robyngit
Copy link
Member Author

Commit 351f3f5 fixes the issue with values being < 0

@robyngit robyngit added this to the 2.23.0 milestone Aug 23, 2022
robyngit added a commit that referenced this issue Aug 23, 2022
- Data for the legend is sorted
- Tooltip values of "0" are now displayed as expected
- Values in the tooltip are rounded to a given number of decimal places that is dependent on the magnitude of the range of values. Scientific notation is used in the case of very small or large ranges.

Relates to #2049
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cesium pdg Permafrost Discovery Gateway portals Anything related to portals
Projects
None yet
Development

No branches or pull requests

1 participant