Skip to content

Commit a19e377

Browse files
committed
gradient color scale issue
1 parent 9d396d6 commit a19e377

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

js/util/colorScale.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,15 @@ class BinnedColorScale {
6666

6767

6868
class GradientColorScale {
69-
constructor({min, max, minColor, maxColor}) {
69+
constructor(config) {
7070
this.type = 'gradient'
71-
this.setProperties({min, max, minColor, maxColor})
71+
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)
7278
}
7379

7480
setProperties({min, max, minColor, maxColor}) {

0 commit comments

Comments
 (0)