-
Notifications
You must be signed in to change notification settings - Fork 60
Support divergent color ramps #912
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
Open
nakul-py
wants to merge
61
commits into
geojupyter:main
Choose a base branch
from
nakul-py:divergent
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
78e9966
Supporting divergent colomaps
nakul-py 63bcb15
critical value only for divergent
nakul-py e9ecb40
Divergent with min-max
nakul-py 2e2f37b
changes
nakul-py 67faef4
lint fix
nakul-py 1af0c01
support singleband psuedocolor
nakul-py 19ed962
pre-populating values
nakul-py dbeb780
making radius work wit min and max
nakul-py c1fbede
gives colors a sequance
nakul-py b478a85
Simplify call to useColorMapList effect
mfisher87 df7df8f
Remove type assertion
mfisher87 4c86aaf
Update selectedRamp state initialization
nakul-py 8374c71
Refactor getColorMapList to use objectEntries for improved readability
nakul-py c5735c4
Refactor ColorRamp components to improve prop naming and structure; a…
nakul-py fe3465a
Refactor ColorRamp type usage to improve type safety and consistency …
nakul-py 5199cb4
Update ColorRampOptions to require numberOfShades and selectedMode fo…
nakul-py 63c1185
formatting
nakul-py f9108cb
Refactor ColorRamp and LegendItem component and critical value calcul…
nakul-py c643d52
Enable color ramp labels to display over light color ramps
mfisher87 437bcf0
Remove unnecessary cast
mfisher87 20ee921
making Critical value readonly and fixing colorRamp hover effect
nakul-py 422580b
using min and max instead of all values
nakul-py 60e643f
Refactor: Extract reversal checkbox into CanvasSelectComponent
mfisher87 29b4b9c
WIP: remove hardcoded min/max values
mfisher87 37d946a
Refactor: Improve layout and state management in color ramp components
nakul-py a928f56
lint fix
nakul-py b283268
making Use actual range button work with actual data
nakul-py 8e9b604
Making categorized rendertype work with use actual range button
nakul-py f2bc41f
debug
nakul-py 317142d
removing duplicate min/max
nakul-py 4af515d
Move classification-stop options near the classify button
mfisher87 a39b547
Add visual separator between colormap/classification and other symbol…
mfisher87 e9de64d
Simplify expression of calculateEqualIntervalBreaks function
mfisher87 b874d0f
Making modes work
nakul-py e8f1db6
Move the "Use actual range" button to right, display more prominent w…
mfisher87 aaf19d4
Fix subtle shift in UI when displaying warning
mfisher87 b30b727
Lint :bell:
mfisher87 f985d6f
Improve name of rampNames module, remove unused COLOR_RAMP_NAMES
mfisher87 25183fc
refactoring
nakul-py 504a687
Add reverse option to color ramp rendering
nakul-py 2b5223b
Use disabled property to style input fields
mfisher87 928278a
Improve label of "use actual range" button
mfisher87 345af02
Improve conditions to disable min/max controls
mfisher87 cc0901f
Skip rendering the minmax controls if rendertype incorrect
mfisher87 18abc0e
Leave props packed in "props" object
mfisher87 78c5ca9
Fixup critical value display
mfisher87 6ec6d16
Save "reverse", "min", and "max" into symbology state in shared model
mfisher87 44b352e
WIP Fix loading of reverse/min/max values from shared model
mfisher87 273b7f5
min and max succesfully loading from shared model or lint fix
nakul-py ec77af3
Refactor warning in ColorRampValueControls and min/max handling in S…
nakul-py 9f56575
Load cached min/max values for selected band in SingleBandPseudoColor
nakul-py b433b1d
Use implicit undefined state default
mfisher87 c67144a
Remove obsolete comment
mfisher87 5de88cc
Fix symbology screen crashing when opening for a new layer
mfisher87 5eb2a4c
Get the min/max geotiff values from symbology state
mfisher87 cf7fe08
Remove min/max source fields
mfisher87 3033b51
Don't initialize min/max from user input when adding layer
mfisher87 d1c7ce9
Remove console.logs
mfisher87 443d195
Set the OpenLayers Source object with min/max from symbology info
mfisher87 4755f5e
fix min/max values fallback
nakul-py 9b55f00
Adding min/max caliculation when loading symbology.
nakul-py File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mfisher87 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { IColorRampDefinition } from '@/src/types'; | ||
|
||
export const COLOR_RAMP_DEFINITIONS = { | ||
// 'rainbow-soft': {type: 'Cyclic'}, 11 steps min | ||
// 'hsv': {type: 'Cyclic'}, 11 steps min | ||
phase: { type: 'Cyclic' }, | ||
jet: { type: 'Sequential' }, | ||
hot: { type: 'Sequential' }, | ||
cool: { type: 'Sequential' }, | ||
spring: { type: 'Sequential' }, | ||
summer: { type: 'Sequential' }, | ||
autumn: { type: 'Sequential' }, | ||
winter: { type: 'Sequential' }, | ||
bone: { type: 'Sequential' }, | ||
copper: { type: 'Sequential' }, | ||
greys: { type: 'Sequential' }, | ||
YiGnBu: { type: 'Sequential' }, | ||
greens: { type: 'Sequential' }, | ||
YiOrRd: { type: 'Sequential' }, | ||
bluered: { type: 'Sequential' }, | ||
RdBu: { type: 'Sequential' }, | ||
rainbow: { type: 'Sequential' }, | ||
portland: { type: 'Sequential' }, | ||
blackbody: { type: 'Sequential' }, | ||
earth: { type: 'Sequential' }, | ||
electric: { type: 'Sequential' }, | ||
viridis: { type: 'Sequential' }, | ||
inferno: { type: 'Sequential' }, | ||
magma: { type: 'Sequential' }, | ||
plasma: { type: 'Sequential' }, | ||
warm: { type: 'Sequential' }, | ||
bathymetry: { type: 'Sequential' }, | ||
cdom: { type: 'Sequential' }, | ||
chlorophyll: { type: 'Sequential' }, | ||
density: { type: 'Sequential' }, | ||
'freesurface-blue': { type: 'Sequential' }, | ||
'freesurface-red': { type: 'Sequential' }, | ||
oxygen: { type: 'Sequential' }, | ||
par: { type: 'Sequential' }, | ||
salinity: { type: 'Sequential' }, | ||
temperature: { type: 'Sequential' }, | ||
turbidity: { type: 'Sequential' }, | ||
'velocity-blue': { type: 'Sequential' }, | ||
'velocity-green': { type: 'Sequential' }, | ||
// 'cubehelix': {type: 'Sequential'}, 16 steps min | ||
ice: { type: 'Sequential' }, | ||
oxy: { type: 'Sequential' }, | ||
matter: { type: 'Sequential' }, | ||
amp: { type: 'Sequential' }, | ||
tempo: { type: 'Sequential' }, | ||
rain: { type: 'Sequential' }, | ||
topo: { type: 'Sequential' }, | ||
// 'picnic': {type: 'Divergent', criticalValue: 0.5 }, 11 steps min | ||
balance: { type: 'Divergent', criticalValue: 0.5 }, | ||
delta: { type: 'Divergent', criticalValue: 0.5 }, | ||
curl: { type: 'Divergent', criticalValue: 0.5 }, | ||
diff: { type: 'Divergent', criticalValue: 0.5 }, | ||
tarn: { type: 'Divergent', criticalValue: 0.5 }, | ||
} as const satisfies { [key: string]: IColorRampDefinition }; |
nakul-py marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
We refactored this so that calculating maximum and minimum from the data values is no longer the responsibility of this function; that happens externally.