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

Continuous color map #5426

Merged
merged 19 commits into from
Jul 12, 2021
Merged

Continuous color map #5426

merged 19 commits into from
Jul 12, 2021

Conversation

nf-s
Copy link
Contributor

@nf-s nf-s commented Apr 14, 2021

Continuous color map

Example http://ci.terria.io/continuous-color-map/#share=s-14cIDS8sGwd5gtkumJoU5C7sjt4

#3441

  • Moved TableStyle.colorMap into TableColorMap
  • Replaced colorbrewer.json with d3-scale-chromatic - we now support d3 color scales (in addition to color brewer) - see https://github.com/d3/d3-scale-chromatic
  • Added ContinuousColorMap - it will now be used by default for scalar columns
    • To use DiscreteColorMap - you will need to set numberOfBins to something other than 0.
  • TableColorMap default color palette for scalar columns is not Reds instead of RdYlOr
  • Legends for scalar columns will now calculate optimal numberFormatOptions.maximumFractionDigits and numberFormatOptions.minimumFractionDigits

Todo

  • Fix Minimum and maximum values must be different.

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated CHANGES.md with what I changed.

@nf-s nf-s changed the title initial continuous colormap Continuous color map Apr 14, 2021
@nf-s nf-s marked this pull request as draft April 14, 2021 10:58
@nf-s nf-s marked this pull request as ready for review July 1, 2021 14:27
@nf-s nf-s marked this pull request as draft July 1, 2021 15:13
@nf-s nf-s marked this pull request as ready for review July 2, 2021 02:28
@na9da
Copy link
Collaborator

na9da commented Jul 9, 2021

@nf-s looks awesome! This is definitely a great enhancement.

Setting an invalid value for colorPalette results in app crash.

I'll update if I find any more problems.

@nf-s nf-s merged commit 8f0a7df into next Jul 12, 2021
@nf-s nf-s deleted the continuous-color-map branch July 12, 2021 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants