We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d396d6 commit a19e377Copy full SHA for a19e377
js/util/colorScale.js
@@ -66,9 +66,15 @@ class BinnedColorScale {
66
67
68
class GradientColorScale {
69
- constructor({min, max, minColor, maxColor}) {
+ constructor(config) {
70
this.type = 'gradient'
71
- this.setProperties({min, max, minColor, maxColor})
+ const fixed = {
72
+ min: config.min !== undefined ? config.min : config.low,
73
+ max: config.max !== undefined ? config.max : config.high,
74
+ minColor: config.minColor || config.lowColor,
75
+ maxColor: config.maxColor || config.highColor
76
+ }
77
+ this.setProperties(fixed)
78
}
79
80
setProperties({min, max, minColor, maxColor}) {
0 commit comments